storage

package
v0.0.0-...-50d91fd Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCache

func InitCache()

InitCache to init a cache

Types

type Cache

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

Cache defines a simple memory cache for key-value

func GetCache

func GetCache() *Cache

GetCache return data directory

func (*Cache) Get

func (c *Cache) Get(key string) interface{}

Get returns value with a key

func (*Cache) Set

func (c *Cache) Set(key string, val interface{})

Set to store a key-val to cache

Jump to

Keyboard shortcuts

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