auto create non-existing cache directory
fix https://github.com/chrislusf/seaweedfs/issues/1350
This commit is contained in:
@@ -89,6 +89,7 @@ func NewSeaweedFileSystem(option *Option) *WFS {
|
||||
},
|
||||
}
|
||||
if option.CacheSizeMB > 0 {
|
||||
os.MkdirAll(option.CacheDir, 0755)
|
||||
wfs.chunkCache = chunk_cache.NewChunkCache(256, option.CacheDir, option.CacheSizeMB)
|
||||
grace.OnInterrupt(func() {
|
||||
wfs.chunkCache.Shutdown()
|
||||
|
||||
Reference in New Issue
Block a user