Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultBucketCacheSize is a default maximum number of entries in cache. DefaultBucketCacheSize = 1e3 // DefaultBucketCacheLifetime is a default lifetime of entries in cache. DefaultBucketCacheLifetime = time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketCache ¶
type BucketCache struct {
// contains filtered or unexported fields
}
BucketCache contains cache with objects and the lifetime of cache entries.
func NewBucketCache ¶
func NewBucketCache(config *Config) *BucketCache
NewBucketCache creates an object of BucketCache.
func (*BucketCache) Get ¶
func (o *BucketCache) Get(ns, bktName string) *data.BucketInfo
Get returns a cached object.
func (*BucketCache) Put ¶
func (o *BucketCache) Put(bkt *data.BucketInfo) error
Put puts an object to cache.
Click to show internal directories.
Click to hide internal directories.