BT

InfoQ Homepage News Extensible Caching Added to .NET 4.0

Extensible Caching Added to .NET 4.0

Bookmarks

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
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.

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

Community comments

  • A bit late to the game

    by peter lin /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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 /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.