Skip to content

Instantly share code, notes, and snippets.

@vasiliishvakin
Created September 7, 2013 09:42
Show Gist options
  • Select an option

  • Save vasiliishvakin/6474236 to your computer and use it in GitHub Desktop.

Select an option

Save vasiliishvakin/6474236 to your computer and use it in GitHub Desktop.
<?php
//cache
$seconds_to_cache = 60*60*24*36*3;
$ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
header("Expires: $ts");
header("Pragma: cache");
header("Cache-Control: max-age=$seconds_to_cache");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment