1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-05 16:17:28 +02:00

refactor: dont create multiple instances of the cache (#3504)

This commit is contained in:
Dag
2023-07-08 17:03:12 +02:00
committed by GitHub
parent b594ad2de3
commit c1c8304fc0
10 changed files with 34 additions and 42 deletions

View File

@@ -99,9 +99,7 @@ function getContents(
array $curlOptions = [],
bool $returnFull = false
) {
$cacheFactory = new CacheFactory();
$cache = $cacheFactory->create();
$cache = RssBridge::getCache();
$cache->setScope('server');
$cache->setKey([$url]);
@@ -419,9 +417,7 @@ function getSimpleHTMLDOMCached(
$defaultBRText = DEFAULT_BR_TEXT,
$defaultSpanText = DEFAULT_SPAN_TEXT
) {
$cacheFactory = new CacheFactory();
$cache = $cacheFactory->create();
$cache = RssBridge::getCache();
$cache->setScope('pages');
$cache->setKey([$url]);