---
title: staticFile
slug: cms-11/dev-docs/configuring-staticfile-legacy
docTags: 
createdAt: 2026-07-22T19:45:19.953Z
---

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

The [Configure CMS](docId\:Ki3aZjVaUcNEu4ABnx3dY) topic describes the syntax of the configuration elements.

```xml
## <staticFile>

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

### <staticFile> Element Attributes
```

:::hint{type="info"}
**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.
:::

| Name                                                                                                      | Default value | Description                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------------------------------------------------------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [cacheControl](https://world.optimizely.com/documentation/Class-library/?documentId=cms/10/74DB6E6F)      | auto          | The cache policy used for static files. Possible values are **auto** or one of the values [HttpCacheability](http://msdn.microsoft.com/en-us/library/system.web.httpcacheability.aspx) found at MSDN.com.<br />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`. |
| [enableOutputCache](https://world.optimizely.com/documentation/Class-library/?documentId=cms/10/3947543A) | false         | Defines whether to use the output cache.                                                                                                                                                                                                                                                                                                                                                                                                  |
| [expirationTime](https://world.optimizely.com/documentation/Class-library/?documentId=cms/10/43530B16)    | 12:0:0        | `TimeSpan` that is added to `DateTime.UtcNow` to calculate the `Expires` HTTP header value.                                                                                                                                                                                                                                                                                                                                               |
