diff options
author | 2023-06-22 20:46:36 +0100 | |
---|---|---|
committer | 2023-06-22 20:46:36 +0100 | |
commit | 9a22102fa8b1ce47571d5bba71e8f36895d21bf0 (patch) | |
tree | 3c2af6db0a3905d31243cd840d1dd50bea59dbb0 /internal/cache/cache.go | |
parent | [docs] Clarify email requirement for OIDC (#1918) (diff) | |
download | gotosocial-9a22102fa8b1ce47571d5bba71e8f36895d21bf0.tar.xz |
[bugfix/chore] oauth entropy fix + media cleanup tasks rewrite (#1853)
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) |