Cache Dependency to catch changed document permissions

Stefan Lorenz asked on March 4, 2014 09:16

Hi,

in my code behind I store some values in the cache: CacheHelper.Add(myKeyName, myData,
CacheHelper.GetCacheDependency("nodes|MyPortalXYZ|cms.menuitem|all"),
DateTime.MaxValue, new TimeSpan(0, cacheMinutes, 0));

When I change e.g. the read permission of a document, the cached data doesn't vanish. I'm not sure if I'm using GetCacheDependency() in the right way or if security changes doesn't touch the above dummy.

Stefan

Recent Answers


Roman Koníček answered on March 12, 2014 05:37

Hi,

Dummy keys should be in lower case, so could you please modify your example to nodes|myportalxyz|cms.menuitem|all and check if that resolves the problem?

Best Regards, Roman Konicek

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.