Пример #1
0
 public void clear()
 {
     if (_cacheType == "Redis")
     {
         ICacheManager manager = new RedisCacheManager();
         manager.clear();
     }
 }
Пример #2
0
        public void set(string key, object data, int cacheTime)
        {
            ICacheManager manager;

            if (_cacheType == "Redis")
            {
                manager = new RedisCacheManager();
            }
            else
            {
                manager = new RedisCacheManager();
            }
            manager.set(key, data, cacheTime);
        }
Пример #3
0
        public void removeByPattern(string pattern)
        {
            ICacheManager manager;

            if (_cacheType == "Redis")
            {
                manager = new RedisCacheManager();
            }
            else
            {
                manager = new RedisCacheManager();
            }
            manager.removeByPattern(pattern);
        }
Пример #4
0
        public bool remove(string key)
        {
            ICacheManager manager;

            if (_cacheType == "Redis")
            {
                manager = new RedisCacheManager();
            }
            else
            {
                manager = new RedisCacheManager();
            }
            return(manager.remove(key));
        }
Пример #5
0
        public DTO.Movies get(string key)
        {
            ICacheManager manager;

            if (_cacheType == "Redis")
            {
                manager = new RedisCacheManager();
            }
            else
            {
                manager = new RedisCacheManager();
            }
            return(manager.get(key));
        }