Documentation
¶
Overview ¶
Package cache provides byte-oriented cache implementations. Consumers define their own interfaces; this package depends on neither MCP nor skill storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
MemoryCache stores at most 256 keys, evicting the earliest-expiring entry. Use one shared instance to share invalidation between stores in one process.
func NewMemoryCache ¶
func NewMemoryCache() *MemoryCache
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache adapts an application-owned Redis client for consumer-owned cache interfaces. Use the same prefix on replicas sharing a backing store; use distinct prefixes for unrelated deployments. The caller closes the client.
func NewRedisCache ¶
func NewRedisCache(client redis.Cmdable, prefix string) (*RedisCache, error)