Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear the server cache in iis

I've got a asp.net web site on windows with rather over the top server side caching of files that never change. Unsurprisingly the files have changed. How do I reset the server side cache? I've see lots of how to do it in code but I don't want to add a new page that will clear the cache unless I have too. An IISreset or a box reset will clear the cache but that's rather drastic. Will an application pool recycle? The app pools are set to terminate after idle time out, that'll probably happen overnight will that clear the cache?

code is:

using WebApi.OutputCache.V2;

namespace Foo.Web.API.Controllers
{
    public class BarController :  ApiController
    {
        [HttpGet]
        [CacheOutput ServerTimeSpan = 31536000)]
        public HttpResponseMessage Get(string organisationId, string file)
        {
like image 378
dibs487 Avatar asked Feb 28 '18 13:02

dibs487


Video Answer


2 Answers

I had to delete the files here. This is all that worked for me.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files

like image 117
N73k Avatar answered Oct 12 '22 11:10

N73k


Both clear the cache. Recycling an App Pool is just less drastic, as it continues to process already received requests and cycles after that. This can be done under load - never had issues with it.

like image 33
toornt Avatar answered Oct 12 '22 11:10

toornt