Last active
June 19, 2026 09:35
-
-
Save jessuppi/a311546d5334254bc50245b12d1b90c3 to your computer and use it in GitHub Desktop.
Cloudflare "Cache Assets" Rule For WordPress Websites
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If incoming requests match... | |
| > Custom filter expression | |
| When incoming requests match... | |
| > Edit expression | |
| starts_with(http.request.uri.path, "/wp-content/") or starts_with(http.request.uri.path, "/wp-includes/") | |
| Then... | |
| Cache eligibility | |
| > Eligible for cache | |
| Edge TTL | |
| > Ignore cache-control header and use this TTL | |
| Input time-to-live (TTL) | |
| > 1 month | |
| Status code TTL | |
| > None | |
| Browser TTL | |
| > Override origin and use this TTL | |
| Input time-to-live (TTL) (required) | |
| > 7 days | |
| Cache key | |
| > None | |
| Cache deception armor | |
| > Enabled | |
| Serve stale content while revalidating | |
| > Do not serve stale content while updating (disabled) | |
| Respect strong ETags | |
| > Use strong ETag headers (disabled) | |
| Origin error page pass-through | |
| > Use Origin error page pass-thru (disabled) | |
| Place at | |
| Select order | |
| > Last |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's another rule for "Cache Everything" on WordPress sites:
https://gist.github.com/jessuppi/4a8334d777621867f08c24f77c0857fc