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