/// <summary> /// 此方法由 ASP.NET 4 系统调用,不应从用户代码中直接调用。 /// </summary> public static void Initialize() { ViewEngines.Engines.Add(_viewEngine); CachePolicyProviders = new SynchronizedCollection <IMvcCachePolicyProvider>(_cachePolicyProvidersSync); GlobalFilters.Filters.Add(GlobalCacheFilter = new GlobalCacheFilter()); CacheStorageProvider = new WebCacheStorageProvider(HostingEnvironment.Cache); }
/// <summary> /// 此方法由 ASP.NET 4 系统调用,不应从用户代码中直接调用。 /// </summary> public static void Initialize() { ViewEngines.Engines.Add( _viewEngine ); CachePolicyProviders = new SynchronizedCollection<IMvcCachePolicyProvider>( _cachePolicyProvidersSync ); GlobalFilters.Filters.Add( GlobalCacheFilter = new GlobalCacheFilter() ); CacheStorageProvider = new WebCacheStorageProvider( HostingEnvironment.Cache ); }