cache

package
v0.0.0-...-189dd48 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapCache

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

MapCache is a thread-safe map with a mutex.

func NewMapCache

func NewMapCache() *MapCache

NewMapCache initializes a new MapCache.

func (*MapCache) Delete

func (sm *MapCache) Delete(key string)

Delete removes a key from the map.

func (*MapCache) Get

func (sm *MapCache) Get(key string) (string, bool)

Get retrieves a value for a given key from the map.

func (*MapCache) Set

func (sm *MapCache) Set(key, value string)

Set sets a key-value pair in the map.

Jump to

Keyboard shortcuts

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