aboutsummaryrefslogtreecommitdiff
path: root/lib/contents.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/contents.php')
-rw-r--r--lib/contents.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/contents.php b/lib/contents.php
index 4740f5c2..c65d6dfb 100644
--- a/lib/contents.php
+++ b/lib/contents.php
@@ -46,11 +46,11 @@ function getContents($url, $header = array(), $opts = array()){
// Initialize cache
$cache = Cache::create(Configuration::getConfig('cache', 'type'));
- $cache->setPath(PATH_CACHE . 'server/');
+ $cache->setScope('server');
$cache->purgeCache(86400); // 24 hours (forced)
$params = [$url];
- $cache->setParameters($params);
+ $cache->setKey($params);
// Use file_get_contents if in CLI mode with no root certificates defined
if(php_sapi_name() === 'cli' && empty(ini_get('curl.cainfo'))) {
@@ -271,11 +271,11 @@ function getSimpleHTMLDOMCached($url,
// Initialize cache
$cache = Cache::create(Configuration::getConfig('cache', 'type'));
- $cache->setPath(PATH_CACHE . 'pages/');
+ $cache->setScope('pages');
$cache->purgeCache(86400); // 24 hours (forced)
$params = [$url];
- $cache->setParameters($params);
+ $cache->setKey($params);
// Determine if cached file is within duration
$time = $cache->getTime();