private IValueWrapper FindInCaches(CacheOperationContext context, string key, Type returnType) { foreach (var cache in context.Caches) { var result = cache.Get(key, returnType); if (result != null) { return(result); } } return(null); }
private void performCacheEvict( CacheOperationContext context, CacheEvictOperation operation, object result) { var key = ""; foreach (var cache in context.Caches) { if (operation.CacheWide) { cache.Clear(); } else { if (key.IsNullOrWhiteSpace()) { key = context.GenerateKey(result); } cache.Evict(key); } } }
public CachePutRequest(CacheOperationContext context, object key) { this.context = context; this.key = key; }