How to clear cache on IIS quickly and easily?


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?

Thanks


Asked by:- neena
2
: 7686 At:- 12/15/2021 3:51:55 PM
IIS clear cache IIS







2 Answers
profileImage Answered by:- vikas_jk

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

OR

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.

OR

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.)

3
At:- 12/15/2021 4:24:26 PM
Excellent thanks for details, Clearing temporary files worked for me. 0
By : neena - at :- 12/15/2021 4:30:34 PM


profileImage Answered by:- jaya

You can also clear cache using IIS, here are the steps to follow:

  • Launch IIS Manager.
  • Select the server in the navigation tree view.
  • Double-click Application Request Routing Cache.
  • In the Actions pane, select "Delete All Cached Objects".
  • In the confirmation dialog box, click "Yes".
  • All cached contents will be deleted from primary cache location, but it may take time if there are lost of objects in cache.

That's it.

 

1
At:- 6/21/2022 9:16:22 AM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use