mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 23:47:23 +08:00
enable read cache
This commit is contained in:
@@ -15,7 +15,7 @@ public class SeaweedRead {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SeaweedRead.class);
|
||||
|
||||
static ChunkCache chunkCache = new ChunkCache(0);
|
||||
static ChunkCache chunkCache = new ChunkCache(4);
|
||||
|
||||
// returns bytesRead
|
||||
public static long read(FilerGrpcClient filerGrpcClient, List<VisibleInterval> visibleIntervals,
|
||||
|
@@ -61,9 +61,6 @@ public class SeaweedWrite {
|
||||
|
||||
String etag = multipartUpload(targetUrl, auth, bytes, bytesOffset, bytesLength, cipherKey);
|
||||
|
||||
// cache fileId ~ bytes
|
||||
SeaweedRead.chunkCache.setChunk(fileId, bytes);
|
||||
|
||||
LOG.debug("write file chunk {} size {}", targetUrl, bytesLength);
|
||||
|
||||
return FilerProto.FileChunk.newBuilder()
|
||||
|
Reference in New Issue
Block a user