mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-19 10:54:08 +01:00
weed mount, weed dav add option to force cache
This commit is contained in:
1 parent
66ac82bb8f
commit
7367b976b0
9 files changed
+22
-9
No files matched your search
@@ -38,6 +38,7 @@ type WebDavOption struct {
|
||||
Cipher bool
|
||||
CacheDir string
|
||||
CacheSizeMB int64
|
||||
ForceCache bool
|
||||
MaxMB int
|
||||
}
|
||||
|
||||
@@ -133,7 +134,7 @@ func NewWebDavFileSystem(option *WebDavOption) (webdav.FileSystem, error) {
|
||||
cacheDir := path.Join(option.CacheDir, cacheUniqueId)
|
||||
|
||||
os.MkdirAll(cacheDir, os.FileMode(0755))
|
||||
chunkCache := chunk_cache.NewTieredChunkCache(256, cacheDir, option.CacheSizeMB, 1024*1024)
|
||||
chunkCache := chunk_cache.NewTieredChunkCache(256, cacheDir, option.CacheSizeMB, 1024*1024, option.ForceCache)
|
||||
t := &WebDavFileSystem{
|
||||
option: option,
|
||||
chunkCache: chunkCache,
|
||||
|
||||
Reference in new issue
Block a user