diff options
author | 2024-04-15 14:22:21 +0100 | |
---|---|---|
committer | 2024-04-15 14:22:21 +0100 | |
commit | f79d50b9b26590b6d2468aeb41f0846272e08d1a (patch) | |
tree | 196b9bfaf8ad6fce782c2130633cfb5c97cbd31a /internal/cache/cache.go | |
parent | [chore] Turn `accounts-registration-open` false by default (#2839) (diff) | |
download | gotosocial-f79d50b9b26590b6d2468aeb41f0846272e08d1a.tar.xz |
[performance] cached oauth database types (#2838)
* update token + client code to use struct caches
* add code comments
* slight tweak to default mem ratios
* fix envparsing
* add appropriate invalidate hooks
* update the tokenstore sweeping function to rely on caches
* update to use PutClient()
* add ClientID to list of token struct indices
Diffstat (limited to 'internal/cache/cache.go')
-rw-r--r-- | internal/cache/cache.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/cache/cache.go b/internal/cache/cache.go index 3aa21cdd0..d35162172 100644 --- a/internal/cache/cache.go +++ b/internal/cache/cache.go @@ -59,6 +59,7 @@ func (c *Caches) Init() { c.initBlock() c.initBlockIDs() c.initBoostOfIDs() + c.initClient() c.initDomainAllow() c.initDomainBlock() c.initEmoji() @@ -85,9 +86,10 @@ func (c *Caches) Init() { c.initReport() c.initStatus() c.initStatusFave() + c.initStatusFaveIDs() c.initTag() c.initThreadMute() - c.initStatusFaveIDs() + c.initToken() c.initTombstone() c.initUser() c.initWebfinger() |