Created
December 17, 2012 21:21
-
-
Save pwenzel/4322385 to your computer and use it in GitHub Desktop.
Make Cloudflare cache Wordpress pages for 5 minutes
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
<?php | |
if(!is_404()) { | |
// Set caching headers (cache for 5 minutes) | |
header('Cache-Control: max-age=300, must-revalidate'); | |
header('Expires: '.gmdate('D, d M Y H:i:s', strtotime('+5 minutes')).' GMT'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment