Try our conversational search powered by Generative AI!

Cache dependency and load balancing


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?

Apr 09, 2014 11:07

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).

Apr 09, 2014 11:28

Thanks, I now use:

                    new CacheEvictionPolicy(
                        new List<string>() { DataFactoryCache.PageCommonCacheKey(dependencyLink) }


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.