diff options
| author | chrislu <chris.lu@gmail.com> | 2024-09-04 01:19:14 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-09-04 01:19:14 -0700 |
| commit | 7367b976b05bfa69158a60f205dec970c48f50f0 (patch) | |
| tree | b2206ec7b05e34ed95c0255ceb6da5936efdc00b /weed/mount | |
| parent | 66ac82bb8f8a5c5f095387689a503f2bc0edd002 (diff) | |
| download | seaweedfs-7367b976b05bfa69158a60f205dec970c48f50f0.tar.xz seaweedfs-7367b976b05bfa69158a60f205dec970c48f50f0.zip | |
weed mount, weed dav add option to force cache
Diffstat (limited to 'weed/mount')
| -rw-r--r-- | weed/mount/weedfs.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go index a9fbd9380..181340ae3 100644 --- a/weed/mount/weedfs.go +++ b/weed/mount/weedfs.go @@ -41,6 +41,7 @@ type Option struct { CacheDirForRead string CacheSizeMBForRead int64 CacheDirForWrite string + ForceCache bool DataCenter string Umask os.FileMode Quota int64 @@ -95,7 +96,7 @@ func NewSeaweedFileSystem(option *Option) *WFS { wfs.option.filerIndex = int32(rand.Intn(len(option.FilerAddresses))) wfs.option.setupUniqueCacheDirectory() if option.CacheSizeMBForRead > 0 { - wfs.chunkCache = chunk_cache.NewTieredChunkCache(256, option.getUniqueCacheDirForRead(), option.CacheSizeMBForRead, 1024*1024) + wfs.chunkCache = chunk_cache.NewTieredChunkCache(256, option.getUniqueCacheDirForRead(), option.CacheSizeMBForRead, 1024*1024, option.ForceCache) } wfs.metaCache = meta_cache.NewMetaCache(path.Join(option.getUniqueCacheDirForRead(), "meta"), option.UidGidMapper, |
