2

ASP.NET Offers great caching api with lots of functionality. Can anybody answer me that how i can use the caching api with the asp.net mvc.

3 Answers 3

3

Not sure if you've seen this already, but you might want to take a look at the OutputCache attribute. You can use this attribute on the actions in your controllers.. this allows you to cache the action's output.

There is some info on this page of Scott Gu's blog (the section titled 'OutputCache Filter') : http://weblogs.asp.net/scottgu/archive/2008/07/14/asp-net-mvc-preview-4-release-part-1.aspx

Sign up to request clarification or add additional context in comments.

Comments

1

Steven A. Smith has a very good article about cache. This was written back in 2003, but most of them still apply today.

There is a section in the article called "Caching API, Using the Cache Object".

Comments

1

There's an introduction to ASP.NET 2.0's caching mechanism here.

ASP.NET MVC basically relies on this, and adds Cache Attributes. The use of the Cache functionality of ASP.NET Web Forms is a bit problematic. Also check this link.

Also, remember that ASP.NET's cache will not work in a distributed environment. It's basically designed for single-server applications.

There is Microsoft's Velocity project and for instance, or Memcached, which is used by sites like LiveJournal.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.