1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-13 03:54:04 +02:00

refactor: CacheFactory (#2834)

This commit is contained in:
Dag
2022-06-22 18:29:28 +02:00
committed by GitHub
parent b7b9378484
commit 07927008eb
10 changed files with 49 additions and 130 deletions

View File

@@ -487,7 +487,7 @@ EOD;
private function getApiKey($forceNew = 0) {
$cacheFac = new CacheFactory();
$cacheFac->setWorkingDir(PATH_LIB_CACHES);
$r_cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
$r_cache->setScope(get_called_class());
$r_cache->setKey(array('refresh'));
@@ -502,7 +502,7 @@ EOD;
}
$cacheFac = new CacheFactory();
$cacheFac->setWorkingDir(PATH_LIB_CACHES);
$cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
$cache->setScope(get_called_class());
$cache->setKey(array('api_key'));
@@ -539,7 +539,7 @@ EOD;
}
$cacheFac2 = new CacheFactory();
$cacheFac2->setWorkingDir(PATH_LIB_CACHES);
$gt_cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
$gt_cache->setScope(get_called_class());
$gt_cache->setKey(array('guest_token'));