ristretto

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: GPL-3.0 Imports: 5 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 struct {
	// contains filtered or unexported fields
}

func New

func New(log logrus.FieldLogger, size int64) (cache *Cache, err error)

func (*Cache) Del

func (cache *Cache) Del(key string)

func (*Cache) GetExpired

func (cache *Cache) GetExpired(key string) (value []byte, expiredAt time.Time, found bool)

func (*Cache) Range

func (cache *Cache) Range(handle func(key string, value []byte, expiredAt time.Time) bool)

func (*Cache) SetExpired

func (cache *Cache) SetExpired(key string, value []byte, expiredAt time.Time)

func (*Cache) Stats

func (cache *Cache) Stats() clash.Stats

Jump to

Keyboard shortcuts

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