fix,refac: ETag 오기록 수정, Cache 설정을 WebUtil로

This commit is contained in:
2022-04-04 01:44:35 +09:00
parent 0048b865c6
commit 2f417fa944
4 changed files with 71 additions and 50 deletions
+7
View File
@@ -281,6 +281,13 @@ class GetConst extends \sammo\BaseAPI
$storage = new \Nette\Caching\Storages\FileStorage($cacheDir);
$cache = new Cache($storage);
$currentCacheKey = $this->tryCache();
if($modifiedSince !== null && $currentCacheKey->lastModified == $modifiedSince){
return null;
}
if($reqEtag !== null && $currentCacheKey->etag == $reqEtag){
return null;
}
$constCache = $this->readCache($cache);
if ($constCache !== null) {