04c2ba01 by Ivan

Merge branch 'develop' of https://github.com/voidd/beego

2 parents 296bcab4 060b3211
...@@ -147,6 +147,8 @@ func (this *FileCache) Get(key string) interface{} { ...@@ -147,6 +147,8 @@ func (this *FileCache) Get(key string) interface{} {
147 // timeout means how long to keep this file, unit of ms. 147 // timeout means how long to keep this file, unit of ms.
148 // if timeout equals FileCacheEmbedExpiry(default is 0), cache this item forever. 148 // if timeout equals FileCacheEmbedExpiry(default is 0), cache this item forever.
149 func (this *FileCache) Put(key string, val interface{}, timeout int64) error { 149 func (this *FileCache) Put(key string, val interface{}, timeout int64) error {
150 gob.Register(val)
151
150 filename := this.getCacheFileName(key) 152 filename := this.getCacheFileName(key)
151 var item FileCacheItem 153 var item FileCacheItem
152 item.Data = val 154 item.Data = val
......
...@@ -143,7 +143,7 @@ func (fp *FileProvider) SessionExist(sid string) bool { ...@@ -143,7 +143,7 @@ func (fp *FileProvider) SessionExist(sid string) bool {
143 143
144 // Remove all files in this save path 144 // Remove all files in this save path
145 func (fp *FileProvider) SessionDestroy(sid string) error { 145 func (fp *FileProvider) SessionDestroy(sid string) error {
146 os.Remove(path.Join(fp.savePath)) 146 os.Remove(path.Join(fp.savePath, string(sid[0]), string(sid[1]), sid))
147 return nil 147 return nil
148 } 148 }
149 149
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!