Example #1
0
        public static object Get(string key)
        {
            switch (cacheType)
            {
            case CacheType.RuntimeCache:
                return(Runtime.Get(key));

            case CacheType.Memcached:
            case CacheType.ElastiCache:
                return(Memcached.Get(key));

            default:
                return(null);
            }
        }
Example #2
0
        public static bool Remove(string key)
        {
            switch (cacheType)
            {
            case CacheType.RuntimeCache:
                return(Runtime.Remove(key));

            case CacheType.Memcached:
            case CacheType.ElastiCache:
                return(Memcached.Remove(key));

            default:
                return(true);
            }
        }
Example #3
0
        public static bool Store(string key, object value, DateTime expireAt)
        {
            switch (cacheType)
            {
            case CacheType.RuntimeCache:
                return(Runtime.Store(key, value, expireAt));

            case CacheType.Memcached:
            case CacheType.ElastiCache:
                return(Memcached.Store(key, value, expireAt));

            default:
                return(true);
            }
        }