コード例 #1
0
ファイル: Header.php プロジェクト: orbisnull/orbistools
 public static function cache($time = 10800)
 {
     $time = Time::toSeconds($time);
     $ts = gmdate("D, d M Y H:i:s", time() + $time) . " GMT";
     header("Expires: {$ts}");
     header("Pragma: cache");
     header("Cache-Control: max-age={$time}");
 }
コード例 #2
0
ファイル: Response.php プロジェクト: orbisnull/orbistools
 /**
  * @param int|string $timeToCache
  */
 public function setTimeToCache($timeToCache)
 {
     $this->timeToCache = Time::toSeconds($timeToCache);
 }