cache

package
v0.0.0-...-bdab838 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: AGPL-3.0 Imports: 3 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 string) (interface{}, bool)
	Set(key string, value interface{}, duration time.Duration)
	Delete(key string)
}

func OpenGoCache

func OpenGoCache(defaultExpiration, cleanupInterval time.Duration) Cache

type GoCache

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

func (*GoCache) Delete

func (db *GoCache) Delete(key string)

func (*GoCache) Get

func (db *GoCache) Get(key string) (interface{}, bool)

func (*GoCache) Set

func (db *GoCache) Set(key string, value interface{}, duration time.Duration)

Jump to

Keyboard shortcuts

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