1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 03:40:49 +00:00

Merge pull request #497 from pengfei-xue/develop

register interface to gob automatically
This commit is contained in:
astaxie 2014-02-18 16:47:59 +08:00
commit 060b321182

2
cache/file.go vendored
View File

@ -147,6 +147,8 @@ func (this *FileCache) Get(key string) interface{} {
// timeout means how long to keep this file, unit of ms.
// if timeout equals FileCacheEmbedExpiry(default is 0), cache this item forever.
func (this *FileCache) Put(key string, val interface{}, timeout int64) error {
gob.Register(val)
filename := this.getCacheFileName(key)
var item FileCacheItem
item.Data = val