Move Cache::get() to DI::cache()->get()

This commit is contained in:
nupplaPhil 2020-01-07 00:45:49 +01:00
parent f68929633b
commit fe078410a1
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
16 changed files with 20 additions and 33 deletions

View file

@ -819,7 +819,7 @@ class Transmitter
$cachekey = 'APDelivery:createActivity:' . $item_id;
if (!$force) {
$data = Cache::get($cachekey);
$data = DI::cache()->get($cachekey);
if (!is_null($data)) {
return $data;
}

View file

@ -3246,7 +3246,7 @@ class Diaspora
$cachekey = "diaspora:sendParticipation:".$item['guid'];
$result = Cache::get($cachekey);
$result = DI::cache()->get($cachekey);
if (!is_null($result)) {
return;
}
@ -3524,7 +3524,7 @@ class Diaspora
{
$cachekey = "diaspora:buildStatus:".$item['guid'];
$result = Cache::get($cachekey);
$result = DI::cache()->get($cachekey);
if (!is_null($result)) {
return $result;
}
@ -3749,7 +3749,7 @@ class Diaspora
{
$cachekey = "diaspora:constructComment:".$item['guid'];
$result = Cache::get($cachekey);
$result = DI::cache()->get($cachekey);
if (!is_null($result)) {
return $result;
}

View file

@ -2185,7 +2185,7 @@ class OStatus
// Don't cache when the last item was posted less then 15 minutes ago (Cache duration)
if ((time() - strtotime($owner['last-item'])) < 15*60) {
$result = Cache::get($cachekey);
$result = DI::cache()->get($cachekey);
if (!$nocache && !is_null($result)) {
Logger::log('Feed duration: ' . number_format(microtime(true) - $stamp, 3) . ' - ' . $owner_nick . ' - ' . $filter . ' - ' . $previous_created . ' (cached)', Logger::DEBUG);
$last_update = $result['last_update'];