Differences between component caching in web configuration

What is the difference between these two caching components in a web configuration?

<staticContent>
    <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="90.00:00:00" />        
</staticContent>

and

<caching>
    <profiles>
        <add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
        <add extension=".jpeg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
        <add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
        <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
        <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
    </profiles>
</caching>

I'm having trouble finding information on the second version. What is a change when it says "CacheUntilChange" and why will it have a duration?

thank

+5
source share
1 answer

I come across similar doubts. This is what I understood from the extensive content on the Internet.

Please feel free to correct me if I am wrong or add more information if I missed something.

1) <staticContent><clientCache> cached only on the client side.

, . location="ServerAndClient". policy , kernelCachePolicy .

2). StaticContent .

.

3) staticContent , location web.config, staticcontent- .

.

  <location path="Content/common/images">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlCustom="public" cacheControlMaxAge="86400" cacheControlMode="UseMaxAge"/>
      </staticContent>
    </system.webServer>
  </location>

"//". staticContent web.config , .

, , , .

, web.config, .

4) StaticContent IIS, HTTP-

enter image description here

IIS, OutputCaching.

enter image description here

0

All Articles