mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-30 03:20:30 +02:00
refactor: CacheFactory (#2834)
This commit is contained in:
@@ -123,7 +123,7 @@ class ElloBridge extends BridgeAbstract {
|
||||
|
||||
private function getAPIKey() {
|
||||
$cacheFac = new CacheFactory();
|
||||
$cacheFac->setWorkingDir(PATH_LIB_CACHES);
|
||||
|
||||
$cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$cache->setScope(get_called_class());
|
||||
$cache->setKey(array('key'));
|
||||
|
@@ -90,7 +90,7 @@ class InstagramBridge extends BridgeAbstract {
|
||||
if(is_numeric($username)) return $username;
|
||||
|
||||
$cacheFac = new CacheFactory();
|
||||
$cacheFac->setWorkingDir(PATH_LIB_CACHES);
|
||||
|
||||
$cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$cache->setScope(get_called_class());
|
||||
$cache->setKey(array($username));
|
||||
|
@@ -115,7 +115,7 @@ HTML;
|
||||
return;
|
||||
|
||||
$cacheFac = new CacheFactory();
|
||||
$cacheFac->setWorkingDir(PATH_LIB_CACHES);
|
||||
|
||||
$this->clientIDCache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$this->clientIDCache->setScope(get_called_class());
|
||||
$this->clientIDCache->setKey(array('client_id'));
|
||||
|
@@ -88,7 +88,7 @@ class SpotifyBridge extends BridgeAbstract {
|
||||
|
||||
private function getToken() {
|
||||
$cacheFac = new CacheFactory();
|
||||
$cacheFac->setWorkingDir(PATH_LIB_CACHES);
|
||||
|
||||
$cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$cache->setScope(get_called_class());
|
||||
$cache->setKey(array('token'));
|
||||
|
@@ -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'));
|
||||
|
Reference in New Issue
Block a user