fix,refac: ETag 오기록 수정, Cache 설정을 WebUtil로
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user