aboutsummaryrefslogtreecommitdiff
path: root/weed/command/webdav.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-09-04 01:19:14 -0700
committerchrislu <chris.lu@gmail.com>2024-09-04 01:19:14 -0700
commit7367b976b05bfa69158a60f205dec970c48f50f0 (patch)
treeb2206ec7b05e34ed95c0255ceb6da5936efdc00b /weed/command/webdav.go
parent66ac82bb8f8a5c5f095387689a503f2bc0edd002 (diff)
downloadseaweedfs-7367b976b05bfa69158a60f205dec970c48f50f0.tar.xz
seaweedfs-7367b976b05bfa69158a60f205dec970c48f50f0.zip
weed mount, weed dav add option to force cache
Diffstat (limited to 'weed/command/webdav.go')
-rw-r--r--weed/command/webdav.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/webdav.go b/weed/command/webdav.go
index 1d1a43eda..b5f8a64d2 100644
--- a/weed/command/webdav.go
+++ b/weed/command/webdav.go
@@ -32,6 +32,7 @@ type WebDavOption struct {
tlsCertificate *string
cacheDir *string
cacheSizeMB *int64
+ forceCache *bool
maxMB *int
}
@@ -46,6 +47,7 @@ func init() {
webDavStandaloneOptions.tlsCertificate = cmdWebDav.Flag.String("cert.file", "", "path to the TLS certificate file")
webDavStandaloneOptions.cacheDir = cmdWebDav.Flag.String("cacheDir", os.TempDir(), "local cache directory for file chunks")
webDavStandaloneOptions.cacheSizeMB = cmdWebDav.Flag.Int64("cacheCapacityMB", 0, "local cache capacity in MB")
+ webDavStandaloneOptions.forceCache = cmdWebDav.Flag.Bool("forceCache", false, "force to cache reads to local disk")
webDavStandaloneOptions.maxMB = cmdWebDav.Flag.Int("maxMB", 4, "split files larger than the limit")
webDavStandaloneOptions.filerRootPath = cmdWebDav.Flag.String("filer.path", "/", "use this remote path from filer server")
}
@@ -118,6 +120,7 @@ func (wo *WebDavOption) startWebDav() bool {
Cipher: cipher,
CacheDir: util.ResolvePath(*wo.cacheDir),
CacheSizeMB: *wo.cacheSizeMB,
+ ForceCache: *wo.forceCache,
MaxMB: *wo.maxMB,
})
if webdavServer_err != nil {