Documentation
¶
Overview ¶
Package cachetest is the conformance suite every cache.Store passes (memory and database in core, Redis in drivers/redis). A new store calls Run from one of its tests.
See https://github.com/AlexGalhardo/vukem/blob/main/docs/subsystems.md#cache.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run checks store; ttl-based checks sleep briefly (keep TTLs short).
Example ¶
A store implementation runs the suite from one test function.
package main
import (
"testing"
"github.com/AlexGalhardo/vukem/cache"
"github.com/AlexGalhardo/vukem/cache/cachetest"
)
func main() {
_ = func(t *testing.T) {
t.Helper()
cachetest.Run(t, cache.NewMemory(1000))
}
}
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.