Documentation
¶
Overview ¶
Handles caching of HTTP responses
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskCache ¶
type DiskCache struct {
// contains filtered or unexported fields
}
DiskCache implements Cache interface for disk-based caching
type GenericCache ¶
type GenericCache interface { // retrieves cached response data if it exists and is not expired. // returns nil, nil when not found or expired Get(key string) ([]byte, error) // stores response data in the cache at the specified path Set(key string, value []byte) error // initializes the cache (e.g., creates necessary directories) Init() error }
GenericCache interface for caching operations
func NewGenericDisk ¶
func NewGenericDisk(cacheDir string, ttl time.Duration) GenericCache
NewGenericDisk creates a new disk cache
Click to show internal directories.
Click to hide internal directories.