mirror of
https://github.com/minio/minio.git
synced 2026-11-28 23:32:50 +00:00
XL/PutObject: Add single putObject and multipart caching. (#2115)
- Additionally adds test cases as well for object cache. - Adds auto-expiry with expiration and cleanup time interval. Fixes #2080 Fixes #2091
This commit is contained in:
1 parent
b0c180b77c
commit
c0c8a8430e
10 files changed
+482
-81
No files matched your search
@@ -158,16 +158,20 @@ func newXLObjects(disks []string) (ObjectLayer, error) {
|
||||
// Calculate data and parity blocks.
|
||||
dataBlocks, parityBlocks := len(newPosixDisks)/2, len(newPosixDisks)/2
|
||||
|
||||
// Initialize object cache.
|
||||
objCache := objcache.New(globalMaxCacheSize, globalCacheExpiry)
|
||||
|
||||
// Initialize list pool.
|
||||
listPool := newTreeWalkPool(globalLookupTimeout)
|
||||
|
||||
// Initialize xl objects.
|
||||
xl := xlObjects{
|
||||
physicalDisks: disks,
|
||||
storageDisks: newPosixDisks,
|
||||
dataBlocks: dataBlocks,
|
||||
parityBlocks: parityBlocks,
|
||||
// Inititalize list pool.
|
||||
listPool: newTreeWalkPool(globalLookupTimeout),
|
||||
// Initialize object caching, FIXME: support auto cache expiration.
|
||||
objCache: objcache.New(globalMaxCacheSize, objcache.NoExpiration),
|
||||
physicalDisks: disks,
|
||||
storageDisks: newPosixDisks,
|
||||
dataBlocks: dataBlocks,
|
||||
parityBlocks: parityBlocks,
|
||||
listPool: listPool,
|
||||
objCache: objCache,
|
||||
objCacheEnabled: globalMaxCacheSize > 0,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user