Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

staticFile

Describes the <staticFile> section of the configuration file for Optimizely Content Management System (CMS) versions 10 and 11.

The <staticFile> tag controls caching for media assets; the content produced by editors in edit view.

The Configure CMStopic describes the syntax of the configuration elements.

## &lt;staticFile&gt;

    <staticFile cacheControl="string"
                enableOutputCache="bool"
                expirationTime="TimeSpan" />

### &lt;staticFile&gt; Element Attributes

📘

Note

The staticFile element is optional. The following default configuration values are set in code and are overridden if other values are specified in the web.config file.

NameDefault valueDescription
cacheControlautoThe cache policy used for static files. Possible values are auto or one of the values HttpCacheability found at MSDN.com.
If you set the value to auto, the actual cache policy is calculated for each request. If an authenticated user makes the request, the cache policy is HttpCacheability.Private, otherwise HttpCacheability.Public.
enableOutputCachefalseDefines whether to use the output cache.
expirationTime12:0:0TimeSpan that is added to DateTime.UtcNow to calculate the Expires HTTP header value.