Try our conversational search powered by Generative AI!

Caching – staticFile vs staticContent\clientCache

Vote:
 

Looking at paragraph Static Files caching at Caching one can read that for static files IIS settings should be used.

Looking at paragraph Configuring caching of files at Object caching one can read about EPiServer staticFile element. Similar can be read at Configuring staticFile where moreover is missing staticFile section declaration. None of this 2 is showing how to implement element to location. (“You can set the staticFile section of web.config on a location level.”)

I tried staticFile element but it does not work. Upon setting it up CMS stops to serve media system files with 500 error.

What is the problem? Is this staticFile elem. something historical?

Also the paragraph Configuring caching of files seems to me show both can be implemented at once but as you can see the IIS configuration is also set for handling media files. (“The staticFile configuration is used by both the StaticFileHandler that delivers files from Virtual Path Providers and by the media system in CMS.”)

One of them should have precedence if they are working together.

CMS 11.4.6.0.

Update:

After investigation (after removing staticFile and staticFile section declaration) I found files from media system are set with default expire value for static files as noted on Configuring staticFile altough pages denotes that cache is turned off by default.

#195872
Edited, Aug 09, 2018 18:13
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.