060b3211 by astaxie

Merge pull request #497 from pengfei-xue/develop

register interface to gob automatically
2 parents 8906d3e7 05a0a4b0
......@@ -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
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!