cache

package
v0.0.0-...-352fc9d Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 1 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(options ...Option) *Cache

func (Cache) Get

func (c Cache) Get(key any) (any, bool)

func (Cache) Set

func (c Cache) Set(key, value any)

type Option

type Option func(c *Cache)

func WithBufferItems

func WithBufferItems(items int64) Option

func WithMaxCost

func WithMaxCost(cost int64) Option

func WithNumCounters

func WithNumCounters(counters int64) Option

Jump to

Keyboard shortcuts

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