getFile($coverType['id']); $lastModified = filemtime($filename); if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $lastModified == $_SERVER['HTTP_IF_MODIFIED_SINCE']) { header('HTTP/1.0 304 Not Modified'); exit(); } header('Last-Modified: ' . $lastModified); header('Cache-Control: max-age=' . (60 * 60 * 24 * 7)); return File::inline($filename, $image->mime, $image->filename); } }