diff options
Diffstat (limited to 'internal/cache/cache.go')
-rw-r--r-- | internal/cache/cache.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/cache/cache.go b/internal/cache/cache.go index 510b6eb53..df7d9a7ae 100644 --- a/internal/cache/cache.go +++ b/internal/cache/cache.go @@ -92,6 +92,13 @@ func (c *Caches) setuphooks() { c.Visibility.Invalidate("RequesterID", block.TargetAccountID) }) + c.GTS.EmojiCategory().SetInvalidateCallback(func(category *gtsmodel.EmojiCategory) { + // Invalidate entire emoji cache, + // as we can't know which emojis + // specifically this will effect. + c.GTS.Emoji().Clear() + }) + c.GTS.Follow().SetInvalidateCallback(func(follow *gtsmodel.Follow) { // Invalidate follow origin account ID cached visibility. c.Visibility.Invalidate("ItemID", follow.AccountID) |