Using Sql Server 2005 Compact Edition as the backing store for the Caching Application Block (part of Enterprise Library 3.0 April 2007 Release)

It would seem reasonable that, if you wanted to implement client-side caching, you may consider using the Caching Application Block that is part of the Enterprise Library 3.0 April 2007 Release. Additionally, you may want to have a small-footprint store to persist your cached data.
 
Sql Server Compact Edition 2005 would, initially, fit the bill very nicely. The caching application block is configurable, allowing you to select from (by default) a database, isolated storage, or in-memory storage mechanisms. This is where the out-of-the-box suitability ends.
 
Sql Server CE 2005 does not support the use of stored procedures (or triggers, functions, functions, or user-defined datatypes), the default implementation used by the caching application block‘s database backing store. So, if you want to use the caching application block with Sql Server CE 2005, you are forced to roll your own backing store implementation. Fortunately, the code for the application block is open source and provides you with the code for the stored procedures used by the database store implementation that you can re-use in your Sql Server CE 2005 backing store. The open source imlementations, including the stored procedure scripts used in the database backing store, accompanied by a couple of well written articles on Creating Custom Providers for Enterprise Library as well as Adding Configuration Support for Custom Providers in Enterprise Library in ASP.NET 2.0 by Alex Homer, makes implementing a custom provider quite simple and quick to implement.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s