Help us shape the future of Go! Take the 2026 Go Developer Survey

cachetest

package
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 8 Imported by: 0

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

func Run(t *testing.T, store cache.Store)

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))
	}
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL