Default Cache Behavior
Cloudflare respects the origin web server’s cache headers in the following order unless an Edge Cache TTL cache rule overrides the headers.
- Cloudflare does not cache the resource when:
- The
Cache-Control
header is set toprivate
,no-store
,no-cache
, ormax-age=0
. - The
Set-Cookie
header exists.
- The
- Cloudflare does cache the resource when:
- The
Cache-Control
header is set topublic
andmax-age
is greater than 0. - The
Expires
header is set to a future date.
- The
When enabled Origin Cache Control on an Enterprise customer’s website, it indicates that Cloudflare should strictly respect Cache-Control
directives received from the origin server. Free, Pro and Business customers have this feature enabled by default. For a list of directives and behaviors when Origin Cache-Control is enabled or disabled, refer to Cache-Control directives.
Default cached file extensions
Cloudflare only caches based on file extension and not by MIME type. The Cloudflare CDN does not cache HTML by default. Additionally, Cloudflare caches a website’s robots.txt.
7Z | CSV | GIF | MIDI | PNG | TIF | ZIP |
AVI | DOC | GZ | MKV | PPT | TIFF | ZST |
AVIF | DOCX | ICO | MP3 | PPTX | TTF | |
APK | DMG | ISO | MP4 | PS | WEBM | |
BIN | EJS | JAR | OGG | RAR | WEBP | |
BMP | EOT | JPG | OTF | SVG | WOFF | |
BZ2 | EPS | JPEG | SVGZ | WOFF2 | ||
CLASS | EXE | JS | PICT | SWF | XLS | |
CSS | FLAC | MID | PLS | TAR | XLSX |
To cache additional content, refer to Cache Rules to create a rule to cache everything.
Customization options and limits
Cloudflare’s CDN provides several cache customization options:
- Caching behavior for individual URLs via Cache Rules
- Customize caching with Cloudflare Workers
- Adjust caching level, cache TTL, and more via the Cloudflare Caching app
Upload limits
Free | Pro | Business | Enterprise | |
Availability | Yes | Yes | Yes | Yes |
Max upload size | 100 MB | 100 MB | 200 MB | 500+ MB |
If you require a larger upload, group requests smaller than the upload thresholds or upload the full resource through an unproxied (grey-clouded) DNS record.
Cacheable size limits
Cloudflare cacheable file limits:
- Free, Pro and Business customers have a limit of 512 MB.
- For Enterprise customers the default maximum cacheable file size is 5 GB. Contact your account team to request a limit increase.