cache

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStore

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

MemoryStore represents the <MemoryStore> object.

func New

func New(log *logrus.Entry, quitCh <-chan struct{}) *MemoryStore

New creates a new <MemoryStore> object.

func (*MemoryStore) Del

func (ms *MemoryStore) Del(k string)

Del deletes the value by the key from the <MemoryStore>.

func (*MemoryStore) Get

func (ms *MemoryStore) Get(k string) interface{}

Get return the value by the key if the ttl is not expired from the <MemoryStore>.

func (*MemoryStore) GetAllWithPrefix added in v1.9.0

func (ms *MemoryStore) GetAllWithPrefix(prefix string) []interface{}

func (*MemoryStore) Set

func (ms *MemoryStore) Set(k string, v interface{}, ttl int64)

Set stores a key/value pair for <ttl> second(s) into the <MemoryStore>.

Jump to

Keyboard shortcuts

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