$this->name = $name;
}
+ /**
+ * @return integer Unix timestamp
+ */
+ public function getExpiryDate(Options $options)
+ {
+ $mtime = filemtime($this->getPath());
+
+ return $mtime + $options->values['smaxage'];
+ }
+
public function getMimeType()
{
$ext = substr($this->name, -4);
$img = $rep->getImage($options);
if ($config->redirect) {
header('HTTP/1.0 302 Found');
+ header('Expires: ' . date('r', $img->getExpiryDate($options)));
header('Location: ' . $img->getUrl());
} else {
header('Content-type: ' . $img->getMimeType());