How do we do cache management in MVC ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajanikant HawaldarRank #110 · 20.2K reputationPosted May 30, 2024, 5:47 AM EDT
https://www.c-sharpcorner.com/Blogs/caching-in-asp-net-mvc
Aravind GovindarajRank #430 · 5.8K reputationPosted May 30, 2024, 8:15 AM EDT
Typically, cache management is used to improve the application performance and we can annotate this in top of the API methods. please find the snippet for the same.
[OutputCache(Duration = 60)] public ActionResult Index(){ //you code goes here; }Please find more information in this below link
https://www.tutorialspoint.com/asp.net_mvc/asp.net_mvc_caching.htm#:~:text=In%20ASP.NET%20MVC%2C%20there,particular%20controller%20in%20the%20memory.