mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] request blocking by http headers (#2409)
This commit is contained in:
22
internal/cache/cache.go
vendored
22
internal/cache/cache.go
vendored
@@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user