mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 01:25:21 +02:00
refactor: move cache logic into the factory (#2884)
This commit is contained in:
parent
5b9b579652
commit
321ec7c8c1
10 changed files with 16 additions and 15 deletions
|
@ -70,7 +70,7 @@ function getContents(
|
|||
) {
|
||||
$cacheFactory = new CacheFactory();
|
||||
|
||||
$cache = $cacheFactory->create(Configuration::getConfig('cache', 'type'));
|
||||
$cache = $cacheFactory->create();
|
||||
$cache->setScope('server');
|
||||
$cache->purgeCache(86400); // 24 hours (forced)
|
||||
$cache->setKey([$url]);
|
||||
|
@ -319,7 +319,7 @@ function getSimpleHTMLDOMCached(
|
|||
// Initialize cache
|
||||
$cacheFac = new CacheFactory();
|
||||
|
||||
$cache = $cacheFac->create(Configuration::getConfig('cache', 'type'));
|
||||
$cache = $cacheFac->create();
|
||||
$cache->setScope('pages');
|
||||
$cache->purgeCache(86400); // 24 hours (forced)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue