diff options
Diffstat (limited to 'internal/cache/status.go')
-rw-r--r-- | internal/cache/status.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/cache/status.go b/internal/cache/status.go index f3cbce779..898b50846 100644 --- a/internal/cache/status.go +++ b/internal/cache/status.go @@ -85,6 +85,11 @@ func (c *StatusCache) Put(status *gtsmodel.Status) { c.cache.Set(status.ID, copyStatus(status)) } +// Invalidate invalidates one status from the cache using the ID of the status as key. +func (c *StatusCache) Invalidate(statusID string) { + c.cache.Invalidate(statusID) +} + // copyStatus performs a surface-level copy of status, only keeping attached IDs intact, not the objects. // due to all the data being copied being 99% primitive types or strings (which are immutable and passed by ptr) // this should be a relatively cheap process |