Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultTTL is the default time-to-live for cache entries DefaultTTL = 60 * time.Second // CacheDir is the directory where cache files are stored CacheDir = ".cache/gh-arc" )
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
GenerateKey creates a cache key from components
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache represents a filesystem-based cache
func (*Cache) CleanExpired ¶
CleanExpired removes expired cache entries
type CacheEntry ¶
type CacheEntry struct {
Data json.RawMessage `json:"data"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt time.Time `json:"expires_at"`
}
CacheEntry represents a cached item with metadata
Click to show internal directories.
Click to hide internal directories.