cache

package
v0.0.0-...-e3cadf0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cache provides simple access to in-memory cache. The major thing for using this is accessing user's decks

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = fmt.Errorf("value not found")

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache implements thread-safe Load, Store functions.

func New

func New() Cache

func (Cache) Delete

func (c Cache) Delete(k any) error

func (Cache) Load

func (c Cache) Load(k any) (any, error)

Load returns a value if stored in cache.

func (Cache) Store

func (c Cache) Store(k, v any) error

Store puts the value v with key k.

Jump to

Keyboard shortcuts

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