mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 07:30:55 +00:00
fix a code broken when documenting
This commit is contained in:
parent
4037f952ec
commit
f96eec6dea
7
cache/file.go
vendored
7
cache/file.go
vendored
@ -47,10 +47,11 @@ type FileCache struct {
|
||||
EmbedExpiry int
|
||||
}
|
||||
|
||||
// Create new file cache with default directory and suffix.
|
||||
// Create new file cache with no config.
|
||||
// the level and expiry need set in method StartAndGC as config string.
|
||||
func NewFileCache() *FileCache {
|
||||
return &FileCache{CachePath:FileCachePath, FileSuffix:FileCacheFileSuffix}
|
||||
// return &FileCache{CachePath:FileCachePath, FileSuffix:FileCacheFileSuffix}
|
||||
return &FileCache{}
|
||||
}
|
||||
|
||||
// Start and begin gc for file cache.
|
||||
@ -142,7 +143,7 @@ func (this *FileCache) Get(key string) interface{} {
|
||||
}
|
||||
|
||||
// Put value into file cache.
|
||||
// timeout means how long to keep this file, unit of second.
|
||||
// timeout means how long to keep this file, unit of ms.
|
||||
func (this *FileCache) Put(key string, val interface{}, timeout int64) error {
|
||||
filename := this.getCacheFileName(key)
|
||||
var item FileCacheItem
|
||||
|
Loading…
Reference in New Issue
Block a user