PIAB: CachingCallHandler behavior?

Topics: Policy Injection Application Block
May 22, 2007 at 3:22 PM
It seems like the ExpirationTime parameter is not the time that the data in the cache is valid, instead it is the time of inactivity that should trigger a refresh in the cache, or is this a consistent behavior in a cache, and I'm just looking stupid right now?
May 22, 2007 at 5:03 PM
It is a sliding expiration time. Hence if you cache for 5 minutes, the cached item will be removed 5 minutes after the last time you accessed it.

Regards,

Dave

______________________________

David Hayden
Microsoft MVP C#
May 22, 2007 at 7:12 PM
Ah, point taken. Then it's by design :)

Thanks!
Oct 10, 2007 at 10:03 PM
It's been a few months since this post, and this post appears to be the only one addressing this. It would be possible to modify the CachingCallHandler (and associated classes) to allow for sliding or absolute. I have modified the Policy Injection Quick Start code to allow for a "useAbsolute" bool attribute in the app.config file. If set to true it will use the Absolute expiration of the cache. It seems that this is what the OP was looking for. Has there been any discussion of modifying the EntLib to allow for something along these lines?

-David