flache

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

flache

Golang localcache

Features

  • goroutine safe
  • high performance
  • LRU support
  • zero GC overhead

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotFound    = errors.New("key not found")
	ErrNotEnoughSpace = errors.New("not enough space")
)

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache() *Cache

func (*Cache) Del

func (c *Cache) Del(key string) error

func (*Cache) Get

func (c *Cache) Get(key string) ([]byte, error)

func (*Cache) Set

func (c *Cache) Set(key string, value []byte, expiration time.Duration) error

Jump to

Keyboard shortcuts

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