Guidance on caching

Sep 26, 2009 at 7:44 PM

I've found in my optimization efforts that one of the best ways to speed up web apps is to reduce/eliminate trips to the database, usually by caching as much data in the webserver process as possible. Caching is one of the issues I've been wrestling with regarding Repository-based/linq/entity data access schemes such as that presented here. Where should I do it? What should it look like? How do I expire entries at the proper times? How do I expire an entry when the user requests a change to the database? How do I correctly expire entries when another webserver makes a change to the database? Should I use Velocity for distributed caching? Lots of questions, a million ways to do it, but very little guidance out there in the blogs.

If you could add a caching layer to this sample app and demonstrate some caching best practices, I would find it extremely helpful.

Thanks,
Mike

Coordinator
Jan 5, 2010 at 5:45 PM

I couldn't agree with you more Mike. I'm sorry for not responding until now - I don't know how I missed several of your posts - my apologies.

Caching is definitely something we intended on getting to. Unfortunately, it just seemed to take on a smaller priority than the other things we tackled. We planned on starting to try to implement the caching layer using Velocity first and go from there. Maybe I can get someone from the Velocity team to add caching to this app :)

Don