Versions in this module Expand all Collapse all v0 v0.4.0 Sep 3, 2026 v0.3.0 Sep 2, 2026 Changes in this version + type Entry struct + Body []byte + ExpiresAt time.Time + Header map[string][]string + PromptCacheHitTokens int + PromptCacheMissTokens int + RequestHash string + RequestWords []string + type Stats struct + ExactHits uint64 + HitRate float64 + MaxSize int + Misses uint64 + SimilarHits uint64 + Size int + type TTLResponseCache struct + func NewTTLResponseCache(maxSize int) *TTLResponseCache + func (c *TTLResponseCache) Clear() + func (c *TTLResponseCache) FindSimilar(model string, body []byte, threshold float64) (Entry, string, bool) + func (c *TTLResponseCache) Get(key string) (Entry, bool) + func (c *TTLResponseCache) KeyFor(model string, body []byte) string + func (c *TTLResponseCache) LoadFromFile(path string) error + func (c *TTLResponseCache) SaveToFile(path string) error + func (c *TTLResponseCache) Set(key string, body []byte, header map[string][]string, ttl time.Duration) + func (c *TTLResponseCache) SetWithRequest(key string, body []byte, header map[string][]string, ttl time.Duration, ...) + func (c *TTLResponseCache) Size() int + func (c *TTLResponseCache) Stats() Stats v0.2.0 Aug 20, 2026