Topics: Caching Application Block
Apr 8, 2009 at 1:05 AM
Edited Apr 8, 2009 at 2:07 AM

This is bit of feature request (and hopefully would not be drastic, but simple to make in next release)...

It would be just awesome if CacheItem (in Microsoft.Practices.EnterpriseLibrary.Caching) could have been inherit from, and overwritten.  Why?

In order to delay loading of entire cache store (from whatever source it happens to be Isolated storage, file system, DB, etc...) when BackingStore gets loaded.

For instance Value property of CacheItem, if overridden in the inherited class, could handle the loading of Store items on demand (first time catch item is requests).  Or is there a better way of indicating to the Cache Block that CacheItem exists, but to load the object (CacheItem.Value) at later time.

Apr 8, 2009 at 10:12 AM
I don't think it's the responsibility of the CacheItem.  Seems more like for the Cache class.  However, the parameter for the CacheManager uses explicitly the Cache type so there's no way for you to change its implementation.  Anyway, you can log your feature request here -  http://blogs.msdn.com/agile/archive/2009/01/26/enterprise-library-5-what-s-on-your-wish-list.aspx

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.