IsolatedStorage BackingStore

Topics: Caching Application Block
Jun 25, 2007 at 9:04 PM

It will be great if someone can show me the code snippet of using IsolatedStorage as backing store for caching (storing and retrieving) in a windows application.

I didn't find a single article on the web showing code-snippet for storing and retrieval of caching using IsolatedStorage as Backing store.


Jun 26, 2007 at 9:34 PM

Your client code should be the same regardless of the nature of the backing store. Just configure the isolated storage backing store for your cache manager (in the configuration tool you would right click on the cache manager and add a new backing store). The configuration file should look like this:

<cachingConfiguration defaultCacheManager="Cache Manager">
<add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
numberToRemoveWhenScavenging="10" backingStoreName="Isolated Storage"
name="Cache Manager" />
<add partitionName="Foo" encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.IsolatedStorageBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=, Culture=neutral, PublicKeyToken=null"
name="Isolated Storage" />

Hope this helps,