Documentation
¶
Overview ¶
Package cache is a caching and cache-filling library
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface {
// NewGroup creates a LRU caching namespace with a size limit and a load
// function to be called when the value is mising
NewGroup(name string, cacheBytes int64, loader LoadFunc) Group
}
func FromContext ¶
func FromContext(ctx contextutil.ValueContext) Cache
FromContext returns a `Cache` instance associated with `ctx`, or a `NopCache` if no `Cache` instance could be found.
type Dependencies ¶
Dependencies is an interface to "inject" required services
Directories
¶
| Path | Synopsis |
|---|---|
|
local
Package local provides an LRU cache and cache-filling library that only runs on the local instance.
|
Package local provides an LRU cache and cache-filling library that only runs on the local instance. |
|
Package lru implements a LRU cache.
|
Package lru implements a LRU cache. |
Click to show internal directories.
Click to hide internal directories.