Documentation
¶
Overview ¶
Package cache provides the CacheEntry and Cache interface used by the response-cache plugin. The default in-process implementation is MemoryCache.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Get(key string) (*providers.Response, bool)
Set(key string, resp *providers.Response)
Delete(key string)
Len() int
Clear()
}
Cache defines the interface for response caching.
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is a thread-safe in-memory LRU cache with TTL expiration.
Click to show internal directories.
Click to hide internal directories.