mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-25 12:24:11 +02:00
refactor: dont create multiple instances of the cache (#3504)
This commit is contained in:
@ -415,9 +415,7 @@ abstract class BridgeAbstract implements BridgeInterface
|
||||
*/
|
||||
protected function loadCacheValue(string $key, $duration = null)
|
||||
{
|
||||
$cacheFactory = new CacheFactory();
|
||||
|
||||
$cache = $cacheFactory->create();
|
||||
$cache = RssBridge::getCache();
|
||||
// Create class name without the namespace part
|
||||
$scope = $this->getShortName();
|
||||
$cache->setScope($scope);
|
||||
@ -441,9 +439,7 @@ abstract class BridgeAbstract implements BridgeInterface
|
||||
*/
|
||||
protected function saveCacheValue(string $key, $value)
|
||||
{
|
||||
$cacheFactory = new CacheFactory();
|
||||
|
||||
$cache = $cacheFactory->create();
|
||||
$cache = RssBridge::getCache();
|
||||
$scope = $this->getShortName();
|
||||
$cache->setScope($scope);
|
||||
$cache->setKey([$key]);
|
||||
|
Reference in New Issue
Block a user