Cache de 24h des tuiles sur le navigateur
This commit is contained in:
1 parent
fafddc8d8f
commit
f67158cf63
1 file changed
+2
-2
@@ -158,7 +158,7 @@ switch ($controller->splitted_url[1]) {
|
|||||||
// Cache hit
|
// Cache hit
|
||||||
if (is_file($cacheFile)) {
|
if (is_file($cacheFile)) {
|
||||||
header('Content-Type: application/x-protobuf');
|
header('Content-Type: application/x-protobuf');
|
||||||
header('Cache-Control: public, max-age=31536000, immutable');
|
header('Cache-Control: public, max-age=86400');
|
||||||
header('X-Cache: HIT');
|
header('X-Cache: HIT');
|
||||||
readfile($cacheFile);
|
readfile($cacheFile);
|
||||||
exit;
|
exit;
|
||||||
@@ -197,7 +197,7 @@ switch ($controller->splitted_url[1]) {
|
|||||||
rename($tmp, $cacheFile);
|
rename($tmp, $cacheFile);
|
||||||
|
|
||||||
header('Content-Type: application/x-protobuf');
|
header('Content-Type: application/x-protobuf');
|
||||||
header('Cache-Control: public, max-age=31536000, immutable');
|
header('Cache-Control: public, max-age=86400');
|
||||||
header('X-Cache: MISS');
|
header('X-Cache: MISS');
|
||||||
echo $tile;
|
echo $tile;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user