mirror of
https://github.com/minio/minio.git
synced 2025-11-27 20:58:55 -05:00
Remove globalMaxCacheSize and globalCacheExpiry variables (#3826)
This patch fixes below * Remove global variables globalMaxCacheSize and globalCacheExpiry. * Make global variables into constant in objcache package.
This commit is contained in:
@@ -6,22 +6,24 @@ package objcache
|
||||
|
||||
Package objcache implements in memory caching methods.
|
||||
|
||||
CONSTANTS
|
||||
|
||||
const (
|
||||
// NoExpiry represents caches to be permanent and can only be deleted.
|
||||
NoExpiry = time.Duration(0)
|
||||
|
||||
// DefaultExpiry represents three days time duration when individual entries will be expired.
|
||||
DefaultExpiry = time.Duration(3 * 24 * time.Hour)
|
||||
)
|
||||
|
||||
VARIABLES
|
||||
|
||||
var DefaultExpiry = time.Duration(72 * time.Hour) // 72hrs.
|
||||
|
||||
DefaultExpiry represents default time duration value when individual
|
||||
entries will be expired.
|
||||
|
||||
var ErrCacheFull = errors.New("Not enough space in cache")
|
||||
ErrCacheFull - cache is full.
|
||||
|
||||
var ErrKeyNotFoundInCache = errors.New("Key not found in cache")
|
||||
ErrKeyNotFoundInCache - key not found in cache.
|
||||
|
||||
var NoExpiry = time.Duration(0)
|
||||
NoExpiry represents caches to be permanent and can only be deleted.
|
||||
|
||||
TYPES
|
||||
|
||||
type Cache struct {
|
||||
|
||||
Reference in New Issue
Block a user