-1

When I refresh a page over and over, even with clearing the cache, it around takes 200ms for the HTML to load.

If I load the page after not looking at it for a few hours, it always takes around 25 seconds to return the HTML.

Is this an IIS cache problem - does the IIS cache expire?

Is there any way to extend the IIS cache to be 12 or 24 hours? Any suggestion will be apreciated.

TristanK
  • 9,073
  • 2
  • 28
  • 39
raman
  • 117
  • 7

2 Answers2

2

The IIS Worker Process shuts down after some minutes, and will need to load again when a request hits.

So have a google on how you can keep the IIS WP alive

Also, precompiling the ASP.NET application helps (also, lot of infos in google)

MichelZ
  • 11,068
  • 4
  • 32
  • 59
2

Like MichelZ mentioned, IIS, by default, shuts down the worker process after 20 minutes of inactivity. It also recycles the process once every 29 hours.

all this behavior is configurable and you can change these numbers. If you right click on the application pool that runs your site, you will be able to see the 2 settings Idle Time-out (minutes) under Process Model you can change that to 0 to say infinite

enter image description here

and if you scroll a bit down you will see Regular Time Interval (minutes) under Recycling you can set that to 0 to say infinite

enter image description here

more over, you can look into Application Initialization Module that will help you auto-warm up your site if you want to

ahmelsayed
  • 841
  • 7
  • 3