Exemple #1
0
        public void RestartCaches()
        {
            //Remove cached views
            var keys = (from System.Collections.DictionaryEntry dict in this._httpContext.Cache
                        let k = dict.Key.ToString()
                                //where k.StartsWith(":ViewCacheEntry:")
                                select k).ToList();

            foreach (var key in keys)
            {
                this._httpContext.Cache.Remove(key);
            }
            var allCachedManagers = IocHelper.ResolveAll <ICacheManager>();

            foreach (var cm in allCachedManagers)
            {
                cm.Clear();
            }
        }