noop

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package noop provides a no-op cache useful for tests and feature flags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[K comparable, V any] struct{}

Cache discards all writes and always misses on reads.

func New

func New[K comparable, V any]() *Cache[K, V]

New returns a no-op cache.

func (Cache[K, V]) Clear

func (Cache[K, V]) Clear(context.Context) error

func (Cache[K, V]) Close

func (Cache[K, V]) Close() error

func (Cache[K, V]) Delete

func (Cache[K, V]) Delete(context.Context, K) error

func (Cache[K, V]) Exists

func (Cache[K, V]) Exists(context.Context, K) (bool, error)

func (Cache[K, V]) Get

func (Cache[K, V]) Get(context.Context, K) (V, error)

func (Cache[K, V]) Set

func (Cache[K, V]) Set(context.Context, K, V, time.Duration) error

Jump to

Keyboard shortcuts

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