Get started with Cache
Learn the basics
Discover the benefits of caching with Cloudflare’s CDN and understand the default cache behavior.
Make more resources cacheable
Configure your settings to cache static HTML or cache anonymous page views of dynamic content.
- Speed up your site with caching best practices
- Specify which resources to cache
- Understand Origin Cache Control
- Cache by device type (Enterprise only)
Improve cache hit rates
Include or exclude query strings, optimize cache keys, or enable tiered cache to improve hit rates and reduce traffic to your origin.
- Choose a cache level
- Enable Tiered Cache with Argo
- Configure custom cache keys (Enterprise only)
- Enable Prefetch URLs (Enterprise only)
Secure your cache configuration
Control resources a client is allowed to load and set access permissions to allow different origins to access your origin’s resources. Protect your site from web cache deception attacks while still caching static assets.
- Avoid web cache poisoning attacks
- Configure Cross-Origin Resource Sharing (CORS)
- Enable Cache Deception Armor
Cloudflare features that can alter your HTML and cacheable objects
To provide Cloudflare services to our customers, we may need to alter your HTML or cached objects to enable the feature or provide optimization.
These code alterations only occur on the cacheable objects found at Cloudflare’s edge and do not affect the original source. The changes will also be removed if the specific feature is disabled and the cache is purged.
Review the list of Cloudflare features that function in this manner.
- Auto Minify
- Rocket Loader
- Polish
- Mirage
- Hotlink Protection
- Email address obfuscation
- Bot Management Javascript Detections
Troubleshoot
Resolve common caching concerns.