mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-10 18:44:04 +02:00
refactor: move cache logic into the factory (#2884)
This commit is contained in:
@@ -505,7 +505,7 @@ EOD;
|
||||
{
|
||||
$cacheFac = new CacheFactory();
|
||||
|
||||
$r_cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$r_cache = $cacheFac->create();
|
||||
$r_cache->setScope(get_called_class());
|
||||
$r_cache->setKey(['refresh']);
|
||||
$data = $r_cache->loadData();
|
||||
@@ -520,7 +520,7 @@ EOD;
|
||||
|
||||
$cacheFac = new CacheFactory();
|
||||
|
||||
$cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$cache = $cacheFac->create();
|
||||
$cache->setScope(get_called_class());
|
||||
$cache->setKey(['api_key']);
|
||||
$data = $cache->loadData();
|
||||
@@ -557,7 +557,7 @@ EOD;
|
||||
|
||||
$cacheFac2 = new CacheFactory();
|
||||
|
||||
$gt_cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$gt_cache = $cacheFac->create();
|
||||
$gt_cache->setScope(get_called_class());
|
||||
$gt_cache->setKey(['guest_token']);
|
||||
$guestTokenUses = $gt_cache->loadData();
|
||||
|
Reference in New Issue
Block a user