cache

package
v0.0.0-...-bff975f Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2018 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalCache

type LocalCache struct {
	Mysql *dao.Mysql
	Freq  string
}

func NewCache

func NewCache(mysql *dao.Mysql, freq string) (c *LocalCache)

之所以采用这种方式,是为了给定时器设置一个默认值,go中无法在创建struct的时候设置默认值

func (*LocalCache) GetMysqlData

func (localCache *LocalCache) GetMysqlData() map[string]int

func (*LocalCache) Init

func (localCache *LocalCache) Init()

func (*LocalCache) RefreshCache

func (localCache *LocalCache) RefreshCache()

func (*LocalCache) SetCache

func (localCache *LocalCache) SetCache(cacheData map[string]int)

Jump to

Keyboard shortcuts

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