cache

package
v0.0.0-...-16d2632 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: BSD-3-Clause Imports: 6 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 {
	DefaultExpiration time.Duration
	// contains filtered or unexported fields
}

CACHE main ...

var MainCache CACHE

MainCache is global cache

func (*CACHE) GetMap

func (cache *CACHE) GetMap(cacheKey string, expirationTime int64) (map[string]string, bool)

GetMap bring string from cache, expiration time in seconds

func (*CACHE) GetString

func (cache *CACHE) GetString(cacheKey string, expirationTime int64) (string, bool)

GetString bring string from cache, expiration time in seconds

func (*CACHE) GetStringList

func (cache *CACHE) GetStringList(cacheKey string, expirationTime int64) []string

func (*CACHE) Set

func (cache *CACHE) Set(cacheKey string, value interface{}, expirationTime int64) bool

Set any value to cache, expiration time in seconds

Jump to

Keyboard shortcuts

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