Exemplo n.º 1
0
func init() {
	bc = beego.NewBeeCache()
	bc.Every = 259200 //該單位為秒,0為不過期,259200 三天,604800 即一個星期清空一次緩存
	bc.Start()
}
Exemplo n.º 2
0
func init() {
	shortyLookup = beego.NewBeeCache()
	shortyLookup.Every = DONT_EXPIRE
	shortyLookup.Start()
	beego.AddFuncMap("printShorties", printShorties)
}