Documentation
¶
Overview ¶
Package cachetest is the conformance suite every cache.Cache backend runs: what a hit, a miss and an invalidation mean, independent of where the entries and versions live. A backend's own tests call Run with a factory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// MaxValueBytes is the largest value the backend keeps; 0 skips the
// oversize case.
MaxValueBytes int
// NewPair returns two instances over one shared store, as two processes
// see it; nil skips the cross-instance cases.
NewPair func(t *testing.T) (a, b cache.Cache)
// Entries counts the entries a cache from the factory holds. No Lookup
// reads the key a zero Snapshot would land under, so only a count shows
// that one stored nothing; nil skips that case.
Entries func(c cache.Cache) int
}
Options describes what a backend can do beyond the Cache contract.
Click to show internal directories.
Click to hide internal directories.