Documentation
¶
Overview ¶
Package cache provides an in-memory caching layer for the HTTP server. It uses patrickmn/go-cache for TTL-based caching with LRU-like eviction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache wraps go-cache with additional features for HTTP caching.
func New ¶
New creates a new cache with the given TTL and cleanup interval. defaultTTL is the default expiration time for cache entries. cleanupInterval is how often expired items are removed from memory.
Click to show internal directories.
Click to hide internal directories.