tests

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestEvictFirstInFirstOut

func TestEvictFirstInFirstOut(t *testing.T, newFx func(timeToLive time.Duration, maxSize int) interface {
	stash.Stasher
}) func(*testing.T)

TestEvictFirstInFirstOut can be used to validate the FIFO based eviction

func TestEvictLeastFrequentlyUsed

func TestEvictLeastFrequentlyUsed(t *testing.T, newFx func(timeToLive time.Duration, maxSize int) interface {
	stash.Stasher
}) func(*testing.T)

TestEvictLeastFrequentlyUsed can be used to validate that data that isn't used frequently is evicted

func TestEvictLeastRecentlyUsed

func TestEvictLeastRecentlyUsed(t *testing.T, newFx func(timeToLive time.Duration, maxSize int) interface {
	stash.Stasher
}) func(*testing.T)

TestEvictLeastRecentlyUsed can be used to validate the ability to evict data that has been used less than other data...

func TestEvictSize

func TestEvictSize(t *testing.T, newFx func(timeToLive time.Duration, maxSize int) interface {
	stash.Stasher
}) func(*testing.T)

TestEvictSize will validate that a stash, configured with a set size (in bytes) will evict data (like a FIFO) when that maximum size is reached

func TestStash

func TestStash(t *testing.T, newFx func() stash.Stasher) func(*testing.T)

TestStash validates the basic functions of being able to read, write and delete data in a store that is cacheable

Types

This section is empty.

Jump to

Keyboard shortcuts

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