0

I am using Windows Server AppFabric Caching in our application with local cache enabled. This is configured as following:

<localCache isEnabled="true" sync="TimeoutBased" objectCount="1000" ttlValue="120"/>

I have setup time-out based invalidation with time-out interval of 120 seconds. As per this configuration, local cache will remove items from in-memory cache after every 120 seconds and retrieve item from cache cluster. Is it possible to add a callback which gets fired whenever local cache tries to hit the cache cluster to retrieve items instead of fetching them locally?

Gaurav
  • 895
  • 3
  • 14
  • 31

1 Answers1

1

Unfortunately, there is no way to know if data is fetched locally or not. There are cache server notifications but they are not reliable.

In your scenario, a good approach could be the Read-Through and Write-Behind feature. It does not fit to all situations but your can take a quick look.

Here are some links :

Cybermaxs
  • 24,378
  • 8
  • 83
  • 112