static OutputCache() { DefaultOptions = OutputCacheOptions.None; var providerSettings = new CacheSettingsManager().RetrieveOutputCacheProviderSettings(); if (providerSettings == null || providerSettings.Type == null) { Instance = new MemoryCacheProvider(); } else { try { Instance = (OutputCacheProvider)Activator.CreateInstance(Type.GetType(providerSettings.Type)); Instance.Initialize(providerSettings.Name, providerSettings.Parameters); } catch (Exception ex) { throw new ConfigurationErrorsException( string.Format("Unable to instantiate and initialize OutputCacheProvider of type '{0}'. Make sure you are specifying the full type name.", providerSettings.Type), ex ); } } }
static OutputCache() { DefaultOptions = OutputCacheOptions.None; var providerSettings = new CacheSettingsManager().RetrieveOutputCacheProviderSettings(); if (providerSettings == null || providerSettings.Type == null) { Instance = new MemoryCacheProvider(); } else { try { Instance = (OutputCacheProvider)Activator.CreateInstance(Type.GetType(providerSettings.Type)); Instance.Initialize(providerSettings.Name, providerSettings.Parameters); } catch (Exception ex) { throw new ConfigurationErrorsException( string.Format("Unable to instantiate and initialize OutputCacheProvider of type '{0}'. Make sure you are specifying the full type name.", providerSettings.Type), ex ); } } }
static OutputCache() { var providerType = new CacheSettingsManager().RetrieveOutputCacheProviderType(); if (providerType == null) { instance = new MemoryCacheProvider(); } else { try { instance = (OutputCacheProvider)Activator.CreateInstance(Type.GetType(providerType)); } catch (Exception ex) { throw new ConfigurationErrorsException(string.Format("Unable to instantiate OutputCacheProvider of type '{0}'. Make sure you are specifying the full type name.", providerType), ex); } } }
static OutputCache() { var providerType = new CacheSettingsManager().RetrieveOutputCacheProviderType(); if (providerType == null) { instance = new MemoryCacheProvider(); } else { try { instance = (OutputCacheProvider)Activator.CreateInstance(Type.GetType(providerType)); } catch (Exception ex) { throw new ConfigurationErrorsException(string.Format("Unable to instantiate OutputCacheProvider of type '{0}'. Make sure you are specifying the full type name.", providerType), ex); } } }