Documentation
¶
Overview ¶
Package cache provides cross-instance cache invalidation via Redis pub/sub.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Invalidator ¶
type Invalidator struct {
// contains filtered or unexported fields
}
Invalidator subscribes to Redis pub/sub and invalidates local caches.
func NewInvalidator ¶
func NewInvalidator( redisClient *redis.Client, scip SCIPEvictor, symbols SymbolsInvalidator, logger *zap.Logger, ) *Invalidator
NewInvalidator creates a new cache invalidator.
func (*Invalidator) Start ¶
func (inv *Invalidator) Start(ctx context.Context)
Start begins listening for reindex events and invalidating caches. Runs until ctx is canceled. Should be called in a goroutine.
type SCIPEvictor ¶
type SCIPEvictor interface {
EvictCache(repoID int64)
}
SCIPEvictor evicts cached SCIP data for a repo.
Click to show internal directories.
Click to hide internal directories.