Bug in Caching Application Block

Topics: Caching Application Block
May 2, 2007 at 6:33 PM
I found this strange behavior in EnterpriseLibrary 2.0 Does any one know if they fix it in 3.0 and where can I inform this bug to the developer responsible for Caching Application Block??

Here's the issue:

After a key/value expires from cache, calling cache.Contains(key) returns true IFF cache[key] has not been called At Least Once.

To Illustrate, here's the testing logic:
cache.Add(key, value);
... wait until it expires ...
Assert.IsFalse(cache.Contains(key)) < --- fails
Assert.IsNull(cachekey) < --- pass
Assert.IsFalse(cache.Contains(key)) < --- pass, after cachekey was called at least once.
May 3, 2007 at 1:44 AM
What is cachekey in your example? I would like to see if I can reproduce the problem on my machine with Ent Lib 3.0.




David Hayden
Microsoft MVP C#