Documentation
¶
Overview ¶
Package cache provides a generic key-value store abstraction. Concrete backends (Redis, in-memory) implement the Store interface. Domain-specific caches (model cache, response cache) build on top of Store.
Index ¶
Constants ¶
const (
DefaultRedisTTL = 24 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapStore ¶
type MapStore struct {
// contains filtered or unexported fields
}
MapStore is an in-memory Store for testing.
type Pinger ¶
Pinger is an optional capability for stores backed by a network service that can verify connectivity. Network-backed stores (RedisStore) implement it; in-memory stores (MapStore) do not, since they are always reachable.
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
RedisStore implements generic key-value storage. Used by response cache.
func NewRedisStore ¶
func NewRedisStore(cfg RedisStoreConfig) (*RedisStore, error)
NewRedisStore creates a Redis-based key-value store.
type RedisStoreConfig ¶
RedisStoreConfig holds configuration for generic Redis key-value store.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package modelcache provides model-specific cache types and interfaces.
|
Package modelcache provides model-specific cache types and interfaces. |