weakcache

package
v0.0.0-...-c6e1c22 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WeakCache

type WeakCache struct {
	sync.Map
}

WeakCache data structure

func NewWeakCache

func NewWeakCache() *WeakCache

NewWeakCache constructor

func (*WeakCache) Get

func (c *WeakCache) Get(key string) (value string, ok bool)

Get value by key

func (*WeakCache) Put

func (c *WeakCache) Put(key string, value string) (created bool)

Put a new key value pair

Jump to

Keyboard shortcuts

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