mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 23:03:00 -04:00
Fix setting ETag header on cache miss
This commit is contained in:
parent
531c1c509c
commit
fe0f281b4f
1 changed files with 4 additions and 1 deletions
|
|
@ -25,12 +25,15 @@ abstract class OC_Minimizer {
|
|||
$cache = OC_Cache::getGlobalCache();
|
||||
if (!OC_Request::isNoCache() && (!defined('DEBUG') || !DEBUG)){
|
||||
$gzout = $cache->get($cache_key.'.gz');
|
||||
OC_Response::setETagHeader(md5($gzout));
|
||||
if ($gzout) {
|
||||
OC_Response::setETagHeader(md5($gzout));
|
||||
}
|
||||
}
|
||||
|
||||
if (!$gzout) {
|
||||
$out = $this->minimizeFiles($files);
|
||||
$gzout = gzencode($out);
|
||||
OC_Response::setETagHeader(md5($gzout));
|
||||
$cache->set($cache_key.'.gz', $gzout);
|
||||
}
|
||||
if ($encoding = OC_Request::acceptGZip()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue