cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

func NewMemory

func NewMemory(opts Options) *Memory

func (*Memory) Close

func (m *Memory) Close()

func (*Memory) Del

func (m *Memory) Del(keys ...string)

func (*Memory) Get

func (m *Memory) Get(key string) ([]byte, bool)

func (*Memory) Set

func (m *Memory) Set(key string, value []byte, ttl time.Duration)

func (*Memory) Stats

func (m *Memory) Stats() map[string]any

type Options

type Options struct {
	Enabled    bool
	MaxKeys    int
	MaxBytes   int64
	DefaultTTL time.Duration
}

Jump to

Keyboard shortcuts

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