mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Add updateConfig code to load config changes if possible for every function
This commit is contained in:
10
pkg/donut/cache/data/data.go
vendored
10
pkg/donut/cache/data/data.go
vendored
@@ -75,8 +75,18 @@ func NewCache(maxSize uint64) *Cache {
|
||||
}
|
||||
}
|
||||
|
||||
// SetMaxSize set a new max size
|
||||
func (r *Cache) SetMaxSize(maxSize uint64) {
|
||||
r.Lock()
|
||||
defer r.Unlock()
|
||||
r.maxSize = maxSize
|
||||
return
|
||||
}
|
||||
|
||||
// Stats get current cache statistics
|
||||
func (r *Cache) Stats() Stats {
|
||||
r.Lock()
|
||||
defer r.Unlock()
|
||||
return Stats{
|
||||
Bytes: r.currentSize,
|
||||
Items: r.items.Len(),
|
||||
|
||||
Reference in New Issue
Block a user