Created
July 17, 2018 16:08
-
-
Save farinspace/e7628d56b39f43bd5eaeedbf56e95ccb to your computer and use it in GitHub Desktop.
Prevent long caching in subdirectory for a WPEngine install
This file contains 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
# 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