/// <summary> /// Gets the cache key to be used with GetItem and PutItem. /// </summary> public DbCacheKey GetCacheKey(string key, ICollection <EntitySetBase> dependentEntitySets, DbCachingMode mode) { if (mode == DbCachingMode.ReadWrite) { var versions = GetEntitySetVersions(dependentEntitySets); return(new DbCacheKey(key, dependentEntitySets, versions)); } if (mode == DbCachingMode.ReadOnly) { return(new DbCacheKey(key, null, null)); } throw new ArgumentOutOfRangeException("mode"); }
/// <summary> /// Gets the cache key to be used with GetItem and PutItem. /// </summary> public DbCacheKey GetCacheKey(string key, ICollection<EntitySetBase> dependentEntitySets, DbCachingMode mode) { if (mode == DbCachingMode.ReadWrite) { var versions = GetEntitySetVersions(dependentEntitySets); return new DbCacheKey(key, dependentEntitySets, versions); } if (mode == DbCachingMode.ReadOnly) return new DbCacheKey(key, null, null); throw new ArgumentOutOfRangeException("mode"); }