memory

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Deprecated
	Max int
	Ttl time.Duration
}

type Store

type Store struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(opt Options) *Store

func (*Store) Clear

func (m *Store) Clear()

func (*Store) Count

func (m *Store) Count() int

func (*Store) Delete

func (m *Store) Delete(key string)

func (*Store) Get

func (m *Store) Get(key string) interface{}

func (*Store) Has

func (m *Store) Has(key string) bool

func (*Store) Keys

func (m *Store) Keys() []string

func (*Store) Set

func (m *Store) Set(key string, val interface{}, ttl ...time.Duration)

Jump to

Keyboard shortcuts

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