mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
parent
0dc6925561
commit
c3b085cf7f
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||||
|
|
||||||
namespace Icinga\Web;
|
namespace Icinga\Web;
|
||||||
|
|
||||||
class FileCache
|
class FileCache
|
||||||
@ -191,7 +192,7 @@ class FileCache
|
|||||||
* Whether the given ETag matchesspecific file(s) on disk
|
* Whether the given ETag matchesspecific file(s) on disk
|
||||||
*
|
*
|
||||||
* If no ETag is given we'll try to fetch the one from the current
|
* If no ETag is given we'll try to fetch the one from the current
|
||||||
* HTTP request.
|
* HTTP request. Respects HTTP Cache-Control: no-cache, if set.
|
||||||
*
|
*
|
||||||
* @param string|array $files file(s) to check
|
* @param string|array $files file(s) to check
|
||||||
* @param string $match ETag to match against
|
* @param string $match ETag to match against
|
||||||
@ -208,6 +209,9 @@ class FileCache
|
|||||||
if (! $match) {
|
if (! $match) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] === 'no-cache') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$etag = self::etagForFiles($files);
|
$etag = self::etagForFiles($files);
|
||||||
return $match === $etag ? $etag : false;
|
return $match === $etag ? $etag : false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user