Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# Add cache control for static resources
<FilesMatch "\.(css|js|mjs|svg|gif|png|jpg|webp|ico|wasm|tflite)$">
<If "%{QUERY_STRING} =~ /(^|&)v=/">
Header set Cache-Control "max-age=15778463, immutable"
Header set Cache-Control "max-age=15778463, must-revalidate, immutable"
</If>
<Else>
Header set Cache-Control "max-age=15778463"
Expand Down
2 changes: 1 addition & 1 deletion lib/public/AppFramework/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function __construct(int $status = Http::STATUS_OK, array $headers = [])
public function cacheFor(int $cacheSeconds, bool $public = false, bool $immutable = false) {
if ($cacheSeconds > 0) {
$cacheStore = $public ? 'public' : 'private';
$this->addHeader('Cache-Control', sprintf('%s, max-age=%s, %s', $cacheStore, $cacheSeconds, ($immutable ? 'immutable' : 'must-revalidate')));
$this->addHeader('Cache-Control', sprintf('%s, max-age=%s, %s', $cacheStore, $cacheSeconds, ($immutable ? 'must-revalidate, immutable' : 'must-revalidate')));

// Set expires header
$expires = new \DateTime();
Expand Down
Loading