cache

package
v0.1.0-beta.202310231325 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryCache

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

simple cache implemented using ristretto cache library

func GetCache

func GetCache() *InMemoryCache

func InMemoryInitialize

func InMemoryInitialize(config *ristretto.Config) *InMemoryCache

func (*InMemoryCache) Delete

func (cache *InMemoryCache) Delete(key string)

func (*InMemoryCache) Get

func (cache *InMemoryCache) Get(key string) (interface{}, bool)

func (*InMemoryCache) SetWithTTL

func (cache *InMemoryCache) SetWithTTL(key string, value interface{}, ttl time.Duration) bool

Jump to

Keyboard shortcuts

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