Ejemplo n.º 1
0
        //private static MemoryCache Cache = MemoryCache.Default;

        public void Add <T>(T entity, string key) where T : class
        {
            // bool stroeResult = Cache.Store(StoreMode.Set, key, entity, DateTime.Now.AddMinutes(cacheDuration));
            bool stroeResult = Cache.StoreJson <T>(StoreMode.Set, key, entity);
        }