cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 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)

获取设置的值

func InitCache

func InitCache()

func SetSlideValue

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

设置一个滑动过期的缓存 @expiration 过期时间

func SetValue

func SetValue(key string, value interface{})

设置一个永不过期的缓存

func SetValueByExpiration

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

设置一个带过期时间的缓存

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