June 2009 Entries

Caching with Entity Framework

It’s been quite some time since I last talked about Entity Framework Caching.

Since then a lot of people has come to me asking me if there was something they could do.

Well I’m happy to announce that this week Jaroslaw Kowalski released the source code on msdn code library of sample caching providers ASP.Net Cache, and Velocity on) for Entity Framework.

The solution relies on caching the raw query results (result set) so all of the problems described earlier in my previous post go away and caching becomes transparent for the client.

entity CachingI only wish we could have something like that in Linq to Sql as well. After all linq to Sql works with providers as well (done a little reflection) unfortunately they’re not exposed so there’s not much you can do.

I’m going to give them a try and let you know on how they look.