MCPcopy
hub / github.com/0xERR0R/blocky / ReloadPublishable

Interface ReloadPublishable

cache/redis.go:61–63  ·  view source on GitHub ↗

ReloadPublishable is implemented by inner caches that reload entries internally (e.g. the prefetching cache). The Redis decorator wires its write-through publish in so those reloaded entries are synced like any other Put, without the inner cache or its callers needing to know about Redis. Implementa

Source from the content-addressed store, hash-verified

59// compile-time assertion against this interface so a signature drift fails to build
60// instead of silently disabling Redis sync of reloaded entries.
61type ReloadPublishable[T any] interface {
62 SetReloadPublisher(publish func(key string, val *T, ttl time.Duration))
63}
64
65type redisSyncEntry struct {
66 Key string `json:"k"`

Callers 2

NewRedisExpiringCacheFunction · 0.65

Implementers 1

reloadPublishableInnercache/redis_test.go

Calls

no outgoing calls

Tested by

no test coverage detected