1
0
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:
Dag
2022-07-05 13:20:01 +02:00
committed by GitHub
parent 5b9b579652
commit 321ec7c8c1
10 changed files with 16 additions and 15 deletions

View File

@@ -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();