concache

package
v0.0.0-...-296dac9 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 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 ConCache

type ConCache struct {
	Store cmap.ConcurrentMap
}

func (*ConCache) Count

func (c *ConCache) Count() int

See how many elements are in the map

func (*ConCache) Get

func (c *ConCache) Get(cacheKey string) (interface{}, bool)

Fetch a loaded element

func (*ConCache) Has

func (c *ConCache) Has(cacheKey string) bool

See if a key already exists

func (*ConCache) Initialize

func (c *ConCache) Initialize()

Setup a new concurrent cache

func (*ConCache) Remove

func (c *ConCache) Remove(cacheKey string)

Remove an element

func (*ConCache) Set

func (c *ConCache) Set(cacheKey string, data interface{})

Add a new element

Jump to

Keyboard shortcuts

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