Increase cache lifespan / clear cache upon changes

This commit is contained in:
Michael 2022-05-17 12:32:25 +00:00
parent a880d8b982
commit 73019284ce
7 changed files with 46 additions and 13 deletions

View file

@ -1223,6 +1223,10 @@ class Item
self::updateDisplayCache($posted_item['uri-id']);
}
if ($posted_item['origin'] && ($posted_item['uid'] != 0) && in_array($posted_item['gravity'], [GRAVITY_PARENT, GRAVITY_COMMENT])) {
DI::cache()->delete(ActivityPub\Transmitter::CACHEKEY_OUTBOX . $posted_item['uid']);
}
return $post_user_id;
}