예제 #1
0
 public static function cache($time = 10800)
 {
     $time = Time::toSeconds($time);
     header("Expires: " . self::toGmtDate(time() + $time));
     header("Pragma: cache");
     header("Cache-Control: max-age={$time}");
     header("X-Accel-Expires : " . $time);
 }
예제 #2
0
 /**
  * @param int|string $timeToCache
  */
 public function setTimeToCache($timeToCache)
 {
     $this->timeToCache = Time::toSeconds($timeToCache);
 }