It's hard for me to spend time with the CacheEntryUpdateCallback delegate of the System.Runtime.Caching library. Whenever I define and set a callback, I get an ArgumentException that "CacheItemUpdateCallback must be null." Why should it be zero? I would have to set this and then get a callback.
I do not get this when using the CacheEntryRemovedCallback delegate. I can reliably reproduce this in all my projects. Am I doing something wrong? Here is a small sample application:
using System.Runtime.Caching; class Program { static void Main(string[] args) { var policy = new CacheItemPolicy(); policy.SlidingExpiration = TimeSpan.FromSeconds(10);
Chris source share