1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-10 03:40:18 +00:00

fix cache's bug expird is not changed by get method

This commit is contained in:
astaxie
2013-07-04 13:02:11 +08:00
parent 9b392a0601
commit 174298b497
5 changed files with 23 additions and 25 deletions

4
cache/cache.go vendored
View File

@ -6,7 +6,7 @@ import (
type Cache interface {
Get(key string) interface{}
Put(key string, val interface{}, timeout int) error
Put(key string, val interface{}, timeout int64) error
Delete(key string) error
IsExist(key string) bool
ClearAll() error
@ -28,7 +28,7 @@ func Register(name string, adapter Cache) {
adapters[name] = adapter
}
// config need to be correct JSON as string: {"interval":360}
// config need to be correct JSON as string: {"interval":360}
func NewCache(adapterName, config string) (Cache, error) {
adapter, ok := adapters[adapterName]
if !ok {