Beispiel #1
0
        public async Task <bool> Exists(string id)
        {
            if (Cache.IsCached(id))
            {
                return(true);
            }

            return(await LookupRepository.Exists(id));
        }
Beispiel #2
0
 public IEnumerable <TEntity> GetEntities(QueryRequest queryRequest)
 {
     if (queryRequestToIdsCache.ContainsKey(queryRequest))
     {
         var ids         = queryRequestToIdsCache[queryRequest];
         var cahcedCount = ids.Where(id => Cache.IsCached(id)).Count();
         if (cahcedCount >= ids.Count() - 1)
         {
             return(Cache.Get(ids));
         }
     }
     return(null);
 }