fix: file_cache 문제 추가 수정
This commit is contained in:
@@ -55,7 +55,11 @@ class GetCachedMap extends \sammo\BaseAPI
|
|||||||
return 'cache 불가';
|
return 'cache 불가';
|
||||||
}
|
}
|
||||||
|
|
||||||
$storage = new \Nette\Caching\Storages\FileStorage('data/file_cache');
|
$absolutePath = realpath('data/file_cache');
|
||||||
|
if (!$absolutePath) {
|
||||||
|
return 'cache 불가';
|
||||||
|
}
|
||||||
|
$storage = new \Nette\Caching\Storages\FileStorage($absolutePath);
|
||||||
$cache = new Cache($storage);
|
$cache = new Cache($storage);
|
||||||
|
|
||||||
$now = TimeUtil::nowDateTimeImmutable();
|
$now = TimeUtil::nowDateTimeImmutable();
|
||||||
|
|||||||
@@ -288,6 +288,10 @@ class GetConst extends \sammo\BaseAPI
|
|||||||
if (!prepareDir($cacheDir)) {
|
if (!prepareDir($cacheDir)) {
|
||||||
throw new RuntimeException('cache 폴더 없음');
|
throw new RuntimeException('cache 폴더 없음');
|
||||||
}
|
}
|
||||||
|
$absolutePath = realpath($cacheDir);
|
||||||
|
if (!$absolutePath) {
|
||||||
|
throw new RuntimeException('cache 폴더 없음');
|
||||||
|
}
|
||||||
$storage = new \Nette\Caching\Storages\FileStorage($cacheDir);
|
$storage = new \Nette\Caching\Storages\FileStorage($cacheDir);
|
||||||
$cache = new Cache($storage);
|
$cache = new Cache($storage);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user