diff --git a/kirby-mailjet-routes.php b/kirby-mailjet-routes.php index c7931e9..fb2877e 100644 --- a/kirby-mailjet-routes.php +++ b/kirby-mailjet-routes.php @@ -46,10 +46,10 @@ } if ($file == 'contactslists.json') { - if (!$cl || f::modified($cacheFile) + c::get('plugin.mailjet.json.cache', 60*5) < time()) { + if (!$cl || f::modified($cacheFile) + c::get('plugin.mailjet.json.cache', 60 * 5) < time()) { $cls = KirbyMailjet::contactslists(); if (count($cls) > 0) { - f::write($cacheFile, json_encode($cl)); + f::write($cacheFile, json_encode($cls)); $cl = $cls; } } @@ -58,10 +58,10 @@ $code = 200; } } elseif ($file == 'segments.json') { - if (!$cl || f::modified($cacheFile) + c::get('plugin.mailjet.json.cache', 60*5) < time()) { + if (!$cl || f::modified($cacheFile) + c::get('plugin.mailjet.json.cache', 60 * 5) < time()) { $cls = KirbyMailjet::segments(); if (count($cls) > 0) { - f::write($cacheFile, json_encode($cl)); + f::write($cacheFile, json_encode($cls)); $cl = $cls; } } @@ -70,10 +70,10 @@ $code = 200; } } elseif ($file == 'senders.json') { - if (!$cl || f::modified($cacheFile) + c::get('plugin.mailjet.json.cache', 60*5) < time()) { + if (!$cl || f::modified($cacheFile) + c::get('plugin.mailjet.json.cache', 60 * 5) < time()) { $cls = KirbyMailjet::senders(); if (count($cls) > 0) { - f::write($cacheFile, json_encode($cl)); + f::write($cacheFile, json_encode($cls)); $cl = $cls; } } diff --git a/package.json b/package.json index ceb317a..28156d5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "kirby-mailjet", "description": "Kirby Mailjet makes sending emails with Mailjet simple.", - "version": "0.9.0", + "version": "0.9.1", "author": "Bruno Meilick", "type": "kirby-plugin", "license": "Commercial"