mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-25 06:20:42 +01:00
filer: add option to cache small files to filer store
This commit is contained in:
1 parent
d171d9f988
commit
263eb29e9f
4 files changed
+6
-1
No files matched your search
@@ -55,6 +55,7 @@ type FilerOption struct {
|
||||
Port uint32
|
||||
recursiveDelete bool
|
||||
Cipher bool
|
||||
CacheToFilerLimit int64
|
||||
Filers []string
|
||||
}
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque
|
||||
break
|
||||
}
|
||||
}
|
||||
if chunkOffset < 2048 {
|
||||
if chunkOffset < fs.option.CacheToFilerLimit {
|
||||
smallContent = content
|
||||
}
|
||||
return fileChunks, md5Hash, chunkOffset, nil, smallContent
|
||||
|
||||
Reference in new issue
Block a user