Cache Against Specific Content Version

swc
swc

I want to add an object to our episerver cache that depends on a specific content item, and have it be removed from the cache automatically when the content item is republished.

I have gotten this to work, except only when using the global version key, not the version key for a specific content item. Using the global key is too aggressive.  I'm hoping someone can clarify why this isn't working as expected.

// Filled correctly via service location:
ISynchronizedObjectInstanceCache cache;
IContentCacheKeyCreator cacheKeyCreator;

// Given:
string key = "my-key";
string val = "some-object-that-depends-on-content";
ContentReference link = // reference to a specific content item...
bool success = false;

cache.Insert(key, val, new CacheEvictionPolicy(new List

Thanks!

#178836
May 23, 2017 22:33
* 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.