diff options
Diffstat (limited to 'internal/cache/account.go')
-rw-r--r-- | internal/cache/account.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/cache/account.go b/internal/cache/account.go index 7e23c3194..12675b6b9 100644 --- a/internal/cache/account.go +++ b/internal/cache/account.go @@ -101,6 +101,11 @@ func (c *AccountCache) Put(account *gtsmodel.Account) { c.cache.Set(account.ID, copyAccount(account)) } +// Invalidate removes (invalidates) one account from the cache by its ID. +func (c *AccountCache) Invalidate(id string) { + c.cache.Invalidate(id) +} + // copyAccount performs a surface-level copy of account, 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 |