Example #1
0
        // Overload
        /// <exclude />
        public static CachingSettings GetNamedCaching(string name)
        {
            ICacheSettings cacheSettings = Caching.Caches.FirstOrDefault(f => f.Name == name);

            bool enabled = Caching.Enabled;
            int  size    = CachingSettings.DefaultCacheSize;

            if ((enabled) && (cacheSettings != null))
            {
                enabled = cacheSettings.Enabled && cacheSettings.Size != CachingSettings.NoCacheSize;
                size    = cacheSettings.Size;
            }

            CachingSettings cachingSettings = new CachingSettings(enabled, size);

            return(cachingSettings);
        }
        // Overload
        /// <exclude />
        public static CachingSettings GetNamedCaching(string name)
        {
            ICacheSettings cacheSettings = Caching.Caches.FirstOrDefault(f => f.Name == name);

            bool enabled = Caching.Enabled;
            int size = CachingSettings.DefaultCacheSize;
            if ((enabled) && (cacheSettings != null))
            {
                enabled = cacheSettings.Enabled && cacheSettings.Size != CachingSettings.NoCacheSize;
                size = cacheSettings.Size;
            }

            CachingSettings cachingSettings = new CachingSettings(enabled, size);

            return cachingSettings;
        }