fix a code broken when documenting
Showing
1 changed file
with
4 additions
and
3 deletions
| ... | @@ -47,10 +47,11 @@ type FileCache struct { | ... | @@ -47,10 +47,11 @@ type FileCache struct { |
| 47 | EmbedExpiry int | 47 | EmbedExpiry int |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | // Create new file cache with default directory and suffix. | 50 | // Create new file cache with no config. |
| 51 | // the level and expiry need set in method StartAndGC as config string. | 51 | // the level and expiry need set in method StartAndGC as config string. |
| 52 | func NewFileCache() *FileCache { | 52 | func NewFileCache() *FileCache { |
| 53 | return &FileCache{CachePath:FileCachePath, FileSuffix:FileCacheFileSuffix} | 53 | // return &FileCache{CachePath:FileCachePath, FileSuffix:FileCacheFileSuffix} |
| 54 | return &FileCache{} | ||
| 54 | } | 55 | } |
| 55 | 56 | ||
| 56 | // Start and begin gc for file cache. | 57 | // Start and begin gc for file cache. |
| ... | @@ -142,7 +143,7 @@ func (this *FileCache) Get(key string) interface{} { | ... | @@ -142,7 +143,7 @@ func (this *FileCache) Get(key string) interface{} { |
| 142 | } | 143 | } |
| 143 | 144 | ||
| 144 | // Put value into file cache. | 145 | // Put value into file cache. |
| 145 | // timeout means how long to keep this file, unit of second. | 146 | // timeout means how long to keep this file, unit of ms. |
| 146 | func (this *FileCache) Put(key string, val interface{}, timeout int64) error { | 147 | func (this *FileCache) Put(key string, val interface{}, timeout int64) error { |
| 147 | filename := this.getCacheFileName(key) | 148 | filename := this.getCacheFileName(key) |
| 148 | var item FileCacheItem | 149 | var item FileCacheItem | ... | ... |
-
Please register or sign in to post a comment