Cache dependency and load balancing

Vote:
 

Hi! Is it possible to have a cache dependency to a page in a load balanced environment? All I can find to support this is EPiServer.CacheManager.RuntimeCacheAdd which is deprecated and EPiServer.CacheManager.Insert doesn't have support for this, so what's the plan for these scenarios?

#84914
Apr 09, 2014 11:07
Vote:
 

In 7.5 you can use EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache which e.g. expose method Insert that takes a CacheEvictionPolicy as a parameter. You can pass in cacheKeys that you are dependent on to the CacheEvictionPoilcy constructor. EPiServer.DataFactoryCache have static methods to create cachekeys for content (applies to content even if some of the method names are named with Page).

#84917
Apr 09, 2014 11:28
Vote:
 

Thanks, I now use:

EPiServer.CacheManager.Insert(
                    key,
                    item,
                    new CacheEvictionPolicy(
                        new List<string>() { DataFactoryCache.PageCommonCacheKey(dependencyLink) }
                    )
                );

    

#84922
Apr 09, 2014 13:18
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.