You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.0 version.
Conventions related to caching
Use this convention to determine if the client should cache the request for the given URL. By default all requests are cached:
Conventions.ShouldCacheRequest = url => true;
It decides whether the client being in the aggressive cache mode should use Changes API to monitor notifications and rebuild the cache based on them. If the notification arrives then an outdated item from cache will be revalidated.
Conventions.ShouldAggressiveCacheTrackChanges = true;
Note that it is still possible to get a stale result because of the time needed to receive the notification and checking for cached data.
In addition to the use of notifications, the aggressive cache also revalidates the cache after calling
This behavior is configurable by the following convention:
Conventions.ShouldSaveChangesForceAggressiveCacheCheck = true;