forked from GNUsocial/gnu-social
[COMPONENT][Posting] Clarify use of cache in note replies when posting
This commit is contained in:
parent
4cc4d06b11
commit
a9a60bbd92
@ -335,6 +335,8 @@ class Posting extends Component
|
|||||||
// Update replies cache
|
// Update replies cache
|
||||||
if (!\is_null($reply_to_id)) {
|
if (!\is_null($reply_to_id)) {
|
||||||
Cache::incr(Note::cacheKeys($reply_to_id)['replies-count']);
|
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'])) {
|
if (Cache::exists(Note::cacheKeys($reply_to_id)['replies'])) {
|
||||||
Cache::listPushRight(Note::cacheKeys($reply_to_id)['replies'], $note);
|
Cache::listPushRight(Note::cacheKeys($reply_to_id)['replies'], $note);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user