BT

Your opinion matters! Please fill in the InfoQ Survey!

Extensible Caching Added to .NET 4.0

| by Jonathan Allen Follow 257 Followers on May 12, 2010. Estimated reading time: less than one minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

Microsoft’s Patterns and Practices team has always had a less than stellar reputation. Seen as something ‘other’, they rarely get the attention and respect that the rest of Microsoft’s .NET development teams. Their Enterprise Library consists of customizable components, all open source, that cover the scenarios that most development shops traditionally build on their own or find amongst open source projects ported from Java.

One such component has been promoted into full .NET Framework. Now known as System.Runtime.Caching, this is not only a caching library but also a framework for developing your own libraries. The ObjectCache defines the common operations that all caches should implement. It is paired with an in-memory implementation called MemoryCache. In theory wrappers for other caching products can be created, allowing developers to easily swap out for other implementations.

Cache invalidation can be triggered by events, which are represented by ChangeMonitor objects. Out of the box you only file-based and a SQL Server-based monitors, but others can be easily built. Quite unusual for API documentation in any langauge, the ChangeMonitor contains detailed information on how to correctly implement subclasses.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

A bit late to the game by peter lin

Even though Microsoft is late to the game, it's nice to see .NET get standardized caching. It's going to take a while for it to catch up to existing mature products.

NCache now provides an implementation for .NET 4.0 Caching by Iqbal Khan

As you know, NCache is a really popular distributed cache for .NET. Now, NCache has implemented the .NET Caching provider so you can use NCache with System.Runtime.Caching.

Check it out at www.alachisoft.com/ncache/

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT