Example #1
0
        public CacheValueWrapper <TValue> GetValue(TKey key)
        {
            CacheValueWrapper <TValue> value;

            if (_context.CacheContext.Cache.TryGetObject(GenerateKeyString(key), out value))
            {
                return(value);
            }
            return(CacheValueWrapper <TValue> .CreateMissing());
        }
        public CacheValueWrapper <TValue> GetValue(TKey key)
        {
            CacheValueWrapper <TValue> value;

            if (_store.TryGetValue(key, out value))
            {
                return(value);
            }
            return(CacheValueWrapper <TValue> .CreateMissing());
        }