cache

package
v0.0.0-...-d9d11fa Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lru

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

func NewLru

func NewLru(maxBytes int, evicted func(key string, value simpleLru.CacheValue)) *Lru

func (*Lru) Get

func (l *Lru) Get(key string) (value simpleLru.CacheValue, ok bool)

func (*Lru) Set

func (l *Lru) Set(key string, value simpleLru.CacheValue)

type LruK

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

func NewLruK

func NewLruK(maxBytes int, evicted func(key string, value simpleLru.CacheValue)) *LruK

func (*LruK) Contains

func (l *LruK) Contains(key string) (ok bool)

func (*LruK) Delete

func (l *LruK) Delete(key string)

func (*LruK) Get

func (l *LruK) Get(key string) (value simpleLru.CacheValue, ok bool)

func (*LruK) Len

func (l *LruK) Len() int

func (*LruK) Purge

func (l *LruK) Purge()

func (*LruK) Set

func (l *LruK) Set(key string, value simpleLru.CacheValue)

type String

type String string

func (String) Len

func (t String) Len() int

type TwoQ

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

func New2Q

func New2Q(maxBytes int, evicted func(key string, value simpleLru.CacheValue)) *TwoQ

func (*TwoQ) Get

func (s *TwoQ) Get(key string) (value simpleLru.CacheValue, ok bool)

func (*TwoQ) Set

func (s *TwoQ) Set(key string, value simpleLru.CacheValue)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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