diff options
author | 2023-12-18 14:18:25 +0000 | |
---|---|---|
committer | 2023-12-18 14:18:25 +0000 | |
commit | 8ebb7775a35b632d49a8f294d83ac786666631f3 (patch) | |
tree | 02ac5475274125170132b0a4d9f69bd67491a32c /internal/cache/cache.go | |
parent | fix poll total vote double count (#2464) (diff) | |
download | gotosocial-8ebb7775a35b632d49a8f294d83ac786666631f3.tar.xz |
[feature] request blocking by http headers (#2409)
Diffstat (limited to 'internal/cache/cache.go')
-rw-r--r-- | internal/cache/cache.go | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/internal/cache/cache.go b/internal/cache/cache.go index dabf151ff..73e3ad6f0 100644 --- a/internal/cache/cache.go +++ b/internal/cache/cache.go @@ -18,21 +18,26 @@ package cache import ( + "github.com/superseriousbusiness/gotosocial/internal/cache/headerfilter" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/log" ) type Caches struct { - // GTS provides access to the collection of gtsmodel object caches. - // (used by the database). + // GTS provides access to the collection of + // gtsmodel object caches. (used by the database). GTS GTSCaches - // AP provides access to the collection of ActivityPub object caches. - // (planned to be used by the typeconverter). - AP APCaches + // AllowHeaderFilters provides access to + // the allow []headerfilter.Filter cache. + AllowHeaderFilters headerfilter.Cache - // Visibility provides access to the item visibility cache. - // (used by the visibility filter). + // BlockHeaderFilters provides access to + // the block []headerfilter.Filter cache. + BlockHeaderFilters headerfilter.Cache + + // Visibility provides access to the item visibility + // cache. (used by the visibility filter). Visibility VisibilityCache // prevent pass-by-value. @@ -45,7 +50,6 @@ func (c *Caches) Init() { log.Infof(nil, "init: %p", c) c.GTS.Init() - c.AP.Init() c.Visibility.Init() // Setup cache invalidate hooks. @@ -58,7 +62,6 @@ func (c *Caches) Start() { log.Infof(nil, "start: %p", c) c.GTS.Start() - c.AP.Start() c.Visibility.Start() } @@ -67,7 +70,6 @@ func (c *Caches) Stop() { log.Infof(nil, "stop: %p", c) c.GTS.Stop() - c.AP.Stop() c.Visibility.Stop() } |