cache

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Expiration = "0.5h"
	Interval   = "3s"
)

Variables

This section is empty.

Functions

func ClearKey

func ClearKey(key string)

func GetValue

func GetValue(key string) (interface{}, bool)

Get the configured value

func InitCache

func InitCache()

func SetSlideValue

func SetSlideValue(key string, value interface{}, expiration string)

Set a sliding expiration cashe expiration time

func SetValue

func SetValue(key string, value interface{})

Set a cache that never expires

func SetValueByExpiration

func SetValueByExpiration(key string, value interface{}, expiration string)

Set a cache with an expiration date

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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