Question

Is there any difference between default and named cache in AppFabric? It seems that the msdn documentation :

http://msdn.microsoft.com/en-us/library/ee790985%28v=azure.10%29.aspx

does not seem to refer to any differences.

The reason I am asking this is that, in our deployment environment we need to use the same appFabric cache host due to lack of servers. So, for any client that wants to use the default cache, I am planning to replace that cache name to "dev-default" named cache or "test-default" named cache. I am wondering if there is any difference between the default cache and named cache in terms of storage, performance and etc. I.e will this "named cache redirection" have any impact on appFabric internally?

We use xml based config for appfabric and from what I see in ClusterConfig.xml, there seems to be no difference between default and named cache if you create the cache with:

Remove-Cache -CacheName MyNamedCache command

 <cache consistency="StrongConsistency" name="default" minSecondaries="0">
    <policy>
      <eviction type="Lru" />
      <expiration defaultTTL="10" isExpirable="true" />
    </policy>
  </cache>
  <cache consistency="StrongConsistency" name="MyNamedCache" minSecondaries="0">
    <policy>
      <eviction type="Lru" />
      <expiration defaultTTL="10" isExpirable="true" />
    </policy>
  </cache>

Any comments will highly be appreciated.

Was it helpful?

Solution

Is there any difference between default and named cache in AppFabric?

No it's pretty the same. The only difference is that the default cache will always exists in the cluster whereas a named cache may not be created. You can not remove the default cache or change its name. You have to run a specific task to create a new named cache and you can not create one just by the client api.

I am wondering if there is any difference between the default cache and named cache in terms of storage, performance and etc. I.e will this "named cache redirection" have any impact on appFabric internally?

No but each cache have its own configuration settings (expiration, default ttl, eviction, R/W providers, ...) this settings can potentially affects name cache performance.

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