Raven.Client.Shard.ShardedDocumentStore.DisableAggressiveCaching C# (CSharp) Method

DisableAggressiveCaching() public method

Setup the context for no aggressive caching
This is mainly useful for internal use inside RavenDB, when we are executing queries that has been marked with WaitForNonStaleResults, we temporarily disable aggressive caching.
public DisableAggressiveCaching ( ) : IDisposable
return IDisposable
		public override IDisposable DisableAggressiveCaching()
		{
			var disposables = ShardStrategy.Shards.Select(shard => shard.Value.DisableAggressiveCaching()).ToList();

			return new DisposableAction(() =>
			{
				foreach (var disposable in disposables)
				{
					disposable.Dispose();
				}
			});
		}