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:
... 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.
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.
Microsoft MVP C#