Below is the dataCacheClient
entry in web.config
:
<dataCacheClients>
<dataCacheClient isCompressionEnabled="true" name="default">
<autoDiscover isEnabled="true" identifier="MyRoleName" />
<localCache isEnabled="true" sync="NotificationBased" objectCount="100" ttlValue="3000" />
<clientNotification pollInterval="300" />
<transportProperties maxBufferSize="1073741824" maxBufferPoolSize="1073741824" />
</dataCacheClient>
</dataCacheClients>
The above configuration will use colocated caching on MyRoleName
roles. In addition to colocated caching, I have indicated that I also want to use localCache
. I am still a bit confused about this.
Please could someone validate my assumptions below:
- Cached items will be stored, in addition to the colocated cache, in local RAM (localCache) on each role to improve cache read performance.
- This local cache is "NotificationBased" meaning that it will perform a polling check with the colocated cache to check for changes every 300 seconds (
pollInterval
). If there is a difference, then the local cache will invalidate itself until the next colocated read. - In addition, the local cache will invalidate itself after 3000 seconds (
ttlValue
) which will force a refresh on the next colocated cache read.
In role cache settings I have the following configuration:
- This has nothing to do with local cache.
- "Notifications" enabled means that the colocated cache won't time out.
Thanks