MDL-83350 files: Avoid cacheing user and file repo files
Set the lifetime to zero for files referenced in the local/internal repository (private files and file system), because they should not be cached. Add `no-store` to the cache-control to ensure resources are never cached, always fetching the latest version.
This commit is contained in:
+2
-2
@@ -2609,8 +2609,8 @@ function send_file($path, $filename, $lifetime = null , $filter=0, $pathisstring
|
||||
header('Cache-Control: private, max-age=10, no-transform');
|
||||
header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');
|
||||
header('Pragma: ');
|
||||
} else { //normal http - prevent caching at all cost
|
||||
header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0, no-transform');
|
||||
} else { // Normal http - prevent caching at all cost.
|
||||
header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0, no-transform', 'no-store');
|
||||
header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');
|
||||
header('Pragma: no-cache');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user