예제 #1
0
        public void Remove(VBCacheKey key, string subKeyPrefix)
        {
            string fullKey      = CombineKey(key, subKeyPrefix);
            var    matchingKeys = keys.Where(k => k.StartsWith(fullKey))
                                  .ToList();

            logger.LogDebug($"Remove FullKey = {fullKey} with matching keys = {string.Join(",", matchingKeys)}");
            matchingKeys.ForEach(matchingKey => memoryCache.Remove(matchingKey));
        }
예제 #2
0
 public void Set(VBCacheKey key, object value, TimeSpan?expire = null)
 {
 }
예제 #3
0
 public void Remove(VBCacheKey key, string subKeyPrefix)
 {
 }
예제 #4
0
 public bool TryGet <T>(VBCacheKey key, string subKey, out T value)
 {
     value = default(T);
     return(false);
 }
예제 #5
0
 string CombineKey(VBCacheKey key, string subKey)
 {
     return($"{key.ToString()}.{subKey}");
 }
예제 #6
0
 public bool TryGet <T>(VBCacheKey key, string subKey, out T value)
 {
     return(TryGet(CombineKey(key, subKey), out value));
 }
예제 #7
0
 public bool TryGet <T>(VBCacheKey key, out T value)
 {
     return(TryGet(key.ToString(), out value));
 }
예제 #8
0
 public void Set(VBCacheKey key, string subKey, object value, TimeSpan?expire = null)
 {
     Set(CombineKey(key, subKey), value, expire);
 }
예제 #9
0
 public void Set(VBCacheKey key, object value, TimeSpan?expire = null)
 {
     Set(key.ToString(), value, expire);
 }