예제 #1
0
        public async Task <IDictionary <string, T> > GetAll <T>(string key)
        {
            var stringlist = cacheClient.SearchKeys("*" + key + "*");

            return(await cacheClient.GetAllAsync <T>(stringlist));
        }
예제 #2
0
        public async Task <IEnumerable <WordDefinition> > GetAllCacheEntries()
        {
            var result = await _cacheClient.GetAllAsync <WordDefinition>(GetCacheKeys());

            return(result.Values);
        }
예제 #3
0
 public async Task <IEnumerable <T> > WhereAsync(Func <T, bool> func)
 {
     return((await _cacheClient.GetAllAsync <T>(_cacheClient.SearchKeys($"{typeof(T).Name}*"))).Values
            .Where(func).ToList());
 }