memory

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	GetMemory(key string) (interface{}, bool)
	SetMemory(key string, value any, duration time.Duration)
	DelMemory(key string)
	CloseMemory()
}

func NewMemoryCache

func NewMemoryCache() Cache

NewMemoryCache New creates a new memory that asynchronously cleans expired entries after the given ttl passes.

Jump to

Keyboard shortcuts

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