public override void AfterSave(Group entity, Document document) { var s = new TenantCacheStore( _cache, _tenants.GetTenantForRequest(HttpContext.Current) ); s.Invalidate(Key); }
public override void AfterSave(TEntity entity, Document document) { var s = new TenantCacheStore( _cache, _tenants.GetTenantForRequest(HttpContext.Current) ); var k = BuildKey(entity); if (s.ContainsKey(k)) { s.Replace(k, entity, TimeSpan.FromHours(1)); } }
public override void AfterSave(User entity, Document document) { var s = new TenantCacheStore( _cache, _tenants.GetTenantForRequest(HttpContext.Current) ); var a = s.Get <IDictionary <string, UserSummary> >(Key); if (null != a) { lock (a) { var summary = UserSummary.FromDomain(entity); a[summary.Id] = summary; } } }