From a9a60bbd9262e8c98f6ad06c0d1a0bb5aab258bd Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Tue, 1 Mar 2022 11:19:47 +0000 Subject: [PATCH] [COMPONENT][Posting] Clarify use of cache in note replies when posting --- components/Posting/Posting.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/Posting/Posting.php b/components/Posting/Posting.php index acd623ffb2..faf63ba268 100644 --- a/components/Posting/Posting.php +++ b/components/Posting/Posting.php @@ -335,6 +335,8 @@ class Posting extends Component // Update replies cache if (!\is_null($reply_to_id)) { Cache::incr(Note::cacheKeys($reply_to_id)['replies-count']); + // Not having them cached doesn't mean replies don't exist, but don't push it to the + // list, as that means they need to be refetched, or some would be missed if (Cache::exists(Note::cacheKeys($reply_to_id)['replies'])) { Cache::listPushRight(Note::cacheKeys($reply_to_id)['replies'], $note); }