Hello, We have a website on IIS, Windows server and we are using ASP.NET MVC OutputCache, now we have updated code for few pages, but server is still showing cached pages, so how can I remove cache or clear cache on IIS, without making website go down?
You can clear IIS cache by navigating to below folder on Window server and delete temporary files
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
You can also Recyle the application pool.
By opening IIS, then select "Application Pool" and then select the website for which you want to clear cache, then on right hand side pane, click "recycle".
You can Recyle application pool even when there is web-application load and doesn't require it to go down.
If none of the above solution works, run
iisreset from an elevated command prompt, which will restart IIS and all hosted applications. (Note: This will take your website down for few mins.)
You can also clear cache using IIS, here are the steps to follow:
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly