internal DbCachingPolicy Merge(CacheableEntityAttribute attribute) { // Merge global policy with query policy if (ExpirationTimeout == null && attribute?.Expiry > 0) { ExpirationTimeout = TimeSpan.FromMinutes(attribute.Expiry); } if (MaxRows == null && attribute?.MaxRows > 0) { MaxRows = attribute.MaxRows; } return(this); }
public DbCachingPolicy(CacheableEntityAttribute attribute) { NoCaching = attribute.NeverCache; Merge(attribute); }