mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-25 20:34:22 +02:00
refactor: move cache logic into the factory (#2884)
This commit is contained in:
@ -407,7 +407,7 @@ abstract class BridgeAbstract implements BridgeInterface
|
||||
{
|
||||
$cacheFac = new CacheFactory();
|
||||
|
||||
$cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$cache = $cacheFac->create();
|
||||
$cache->setScope(get_called_class());
|
||||
$cache->setKey($key);
|
||||
if ($cache->getTime() < time() - $duration) {
|
||||
@ -426,7 +426,7 @@ abstract class BridgeAbstract implements BridgeInterface
|
||||
{
|
||||
$cacheFac = new CacheFactory();
|
||||
|
||||
$cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$cache = $cacheFac->create();
|
||||
$cache->setScope(get_called_class());
|
||||
$cache->setKey($key);
|
||||
$cache->saveData($value);
|
||||
|
Reference in New Issue
Block a user