Home All Groups Group Topic Archive Search About

Create caching object like TransactionScope

Author
16 Apr 2007 4:16 PM
PAF
Hi all,

I need some help.

I want to create new object that can make cache for my objects. The
best using way I see is to create one object that is used like
TransactionScope. For example:

using (CacheScope cs = new CacheScope ()) // Starting cache collecting
{
  // Inner this using all objects that implements ICachable interface
are cached somewhere
}
// Stop cache collecting and release cache

My question is how catch object creation that implements ICachable
into the "using" block ?

Thanks for your help.

AddThis Social Bookmark Button