cache

package
v0.0.0-...-2b1a09b Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.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 Cache

type Cache struct {
	Stop chan bool
	// contains filtered or unexported fields
}

func New

func New(defaultExpiration, cleanupInterval time.Duration) (c *Cache)

func (*Cache) Add

func (c *Cache) Add(entity, key, value string, expire time.Duration)

func (*Cache) Get

func (c *Cache) Get(entity, key string) (string, bool)

type Item

type Item struct {
	Expiration int64
	Value      string
}

Jump to

Keyboard shortcuts

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