Documentation
¶
Overview ¶
Package cache provides a lightweight TTL-based disk cache for provider API responses. Each entry is a JSON file under ~/.ggvalet/cache/. Expired entries are pruned on read; flush with Cache.Flush().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a file-backed TTL store.
func (*Cache) Get ¶
func (c *Cache) Get(key string) (json.RawMessage, bool)
Get returns raw cached bytes for key if live. Returns (nil, false) on miss or expiry.
func (*Cache) Set ¶
Set serialises v and stores it under key with the given TTL. Cache failures are silently dropped — they must never break the main path.
Click to show internal directories.
Click to hide internal directories.