Question

I am having Windows AppFabric Caching with several named caches. Is is possible to have a separate expiration policy for each of the named caches.

If it is possible, kindly let me know how this can be acheived via the configuration file.

Sample Code

    <add name="AFCM" type="CelloSaaS.Library.Provider.AppFabricCacheManager, CelloSaaS.Library" RequestTimeout="600"
  RoutingClient="false" LocalCache="true" HostName="192.168.21.3"
  CachePort="22233" CacheHostName="DistributedCacheService" NamedCache="AFCM" InvalidationPolicy="TimeoutBased" DefaultTimeOut="86400"  SecurityMode="None" ProtectionLevel="None" MaxBufferSize = "10000000" />

  <add name="ICM" type="CelloSaaS.Library.Provider.AppFabricCacheManager, CelloSaaS.Library" RequestTimeout="600"
  RoutingClient="false" LocalCache="true" HostName="192.168.0.01"
  CachePort="22233" CacheHostName="DistributedCacheService" NamedCache="ICM" InvalidationPolicy="TimeoutBased" DefaultTimeOut="86400"  SecurityMode="None" ProtectionLevel="None" MaxBufferSize = "10000000" />

Kindly note that according to the code, i guess that the policy specified in the 3rd tag is for the named cache called as AFCM. Kindly clarify me in this regard.

Was it helpful?

Solution

Yes it is possible ! I would highly recommand to try with this great tool : GUI Administrator for Appfabric 1.1

If you are a powershell user, you could try

Set-CacheConfig YourCacheNameHere -Expirable true -TimeToLive 5

(taken from http://msdn.microsoft.com/en-us/library/ff921014.aspx)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top