Hi!
I'm using the following code to cache an object using the CacheManager class in EPiServer:
CacheManager.RuntimeCacheAdd(
cacheKey,
myPageCollection,
DataFactoryCache.CreateDependency(new PageReference(15)));
For some reason the CacheDependency object returned has HasChanged==true, even though the LastModified value doesn't change (and is indeed before DateTime.UtcNow).
In other words, my cached object will never stick since the dependency instantly clears the cache (because of HasChanged==true).
Any suggestions are greatly appreciated! :)