mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 16:37:56 +08:00
refactoring: use interface
This commit is contained in:
@@ -13,6 +13,11 @@ const (
|
||||
onDiskCacheSizeLimit1 = 4 * memCacheSizeLimit
|
||||
)
|
||||
|
||||
type ChunkCache interface {
|
||||
GetChunk(fileId string, minSize uint64) (data []byte)
|
||||
SetChunk(fileId string, data []byte)
|
||||
}
|
||||
|
||||
// a global cache for recently accessed file chunks
|
||||
type TieredChunkCache struct {
|
||||
memCache *ChunkCacheInMemory
|
||||
|
Reference in New Issue
Block a user