Using Caching App Block without configuration

Topics: Caching Application Block , General discussion
Jul 7, 2008 at 3:02 PM
Hello,

I"m trying to aviod using an App.Config file for the caching application block.
is there anyway defining in code my Cache Manager and storage ?

Thanks,
Yanai
Jul 7, 2008 at 4:15 PM
Hi,

You can use the CacheManagerFactory with a properly set-up IConfigurationSource to build the cache managers for you. This configuration source can be a DictionaryConfigurationSource you can populate with configuration objects describing the cache manager and storage you need; you can look at the CacheManagerFactoryFixture for examples.

Hope this helps,
Fernando


yanairon wrote:
Hello,

I"m trying to aviod using an App.Config file for the caching application block.
is there anyway defining in code my Cache Manager and storage ?

Thanks,
Yanai