From 346209da3c9b3b002f1309b6ac80cc5cc1ccb9c8 Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Sat, 20 Apr 2019 13:13:02 +0200 Subject: [PATCH] - fixed cache dir (set in `config.ini` -> API_CACHE`) for "filesystem" based cache backend, closed #763 --- app/main/lib/api/AbstractClient.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/main/lib/api/AbstractClient.php b/app/main/lib/api/AbstractClient.php index 9e87aa8d..6218fd6f 100644 --- a/app/main/lib/api/AbstractClient.php +++ b/app/main/lib/api/AbstractClient.php @@ -37,6 +37,9 @@ use Psr\Http\Message\RequestInterface; */ abstract class AbstractClient extends \Prefab { + /** + * error msg for missing Composer package + */ const ERROR_CLIENT_INVALID = "HTTP API client not found → Check installed Composer packages"; /** @@ -158,11 +161,10 @@ abstract class AbstractClient extends \Prefab { in_array($poolConfig['type'], ['redis', 'folder']) && class_exists(FilesystemCachePool::class) ){ - $filesystemAdapter = new Local('./'); + $filesystemAdapter = new Local(\Base::instance()->get('ROOT')); $filesystem = new Filesystem($filesystemAdapter); + $poolFilesystem = new FilesystemCachePool($filesystem, $poolConfig['folder']); - $poolFilesystem = new FilesystemCachePool($filesystem); - $poolFilesystem->setFolder($poolConfig['folder']); $this->cachePool = $poolFilesystem; }