Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Prevent long caching in subdirectory for a WPEngine install
# Request is cached for at maximum of 10 minutes, then origin revalidation starts
# Clients that send "If-Modified-Since" headers will recieve 304 response unless the file actually changes on origin
# Use: `add_header Last-Modified ""` to remove Last-Modified server headers
location ~* ^/wp-content/themes/theme/subdir/ {
add_header Cache-Control "public, max-age=600, must-revalidate";
etag off;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment