Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFoundKey = errors.NewKind("Unable to find the given key, %s")
Functions ¶
This section is empty.
Types ¶
type ValidableCache ¶
ValidableCache represents a cache, were each new entry should be validate before be read or write a new entry, otherwise is forget and discarded.
func NewValidableCache ¶
func NewValidableCache(cache httpcache.Cache) *ValidableCache
NewValidableCache returns a new ValidableCache based on the given cache.
func (*ValidableCache) Set ¶
func (c *ValidableCache) Set(key string, responseBytes []byte)
Set stores the []byte representation of a response against a key. This data is stored in a temporal space, if isn't validate before `Set` is called again, the information get lost.
func (*ValidableCache) Validate ¶
func (c *ValidableCache) Validate(key string) error
Validate validates the given key as a valid cache entry,
Click to show internal directories.
Click to hide internal directories.