cache

package
v0.0.0-...-3e055fa Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(collection string, key interface{}) error

func ClearPrefix

func ClearPrefix(collection string, prefix string) error

func Get

func Get(collection string, key interface{}) interface{}

func Set

func Set(collection string, key, value interface{}, ttl time.Duration) error

Types

type Cache

type Cache map[string]map[string]*CacheItem

type CacheItem

type CacheItem struct {
	Item    interface{}
	Expires time.Time
}

Jump to

Keyboard shortcuts

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