From e76257717969e8a633b06109bb0bf95570607bd6 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 7 Apr 2025 19:03:04 +0100 Subject: [PATCH] more code comments --- internal/cache/timeline/status.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/cache/timeline/status.go b/internal/cache/timeline/status.go index c4b0b2fae..de92c5768 100644 --- a/internal/cache/timeline/status.go +++ b/internal/cache/timeline/status.go @@ -680,8 +680,11 @@ func (t *StatusTimeline) InsertOne(status *gtsmodel.Status, prepared *apimodel.S return } +// insert will insert given StatusMeta into timeline, and +// if beyond t.max will initiate a timeline trim operation. func (t *StatusTimeline) insert(metas ...*StatusMeta) { if t.cache.Insert(metas...) > t.max { + // If cache reached beyond // maximum, perform a trim. t.Trim()