cache

package
v0.0.0-...-bd298f0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 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 Cache

type Cache interface {
	Get(Key) (interface{}, bool)
	Add(Key, interface{})
}

type Key

type Key interface{}

type LRUCache

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

func NewLRUCache

func NewLRUCache(capacity int) *LRUCache

func (*LRUCache) Add

func (c *LRUCache) Add(key Key, value interface{})

func (*LRUCache) Capacity

func (c *LRUCache) Capacity() int

func (*LRUCache) Get

func (c *LRUCache) Get(key Key) (interface{}, bool)

Jump to

Keyboard shortcuts

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