0

Using IIS 7, I have set output caching which results to this code:

  <profiles>
        <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
        <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
    </profiles>

What is the difference and exact meaning of policy and kernelCachePolicy and what should I consider when setting these options?

Ali Sheikhpour
  • 10,475
  • 5
  • 41
  • 82

1 Answers1

1

You need to first understand IIS architecture,

enter image description here

To control caching in http.sys, use kernelCachePolicy. To control caching in w3wp.exe, use policy.

The pros and cons are also clear based on the architecture diagram.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • Thank you. I have posted a related question here. You may help. https://stackoverflow.com/questions/50567424/web-config-cache-settings-not-working – Ali Sheikhpour May 28 '18 at 15:16