Documentation ¶
Index ¶
- Constants
- Variables
- type BoltCache
- func (bc *BoltCache) Close()
- func (bc *BoltCache) ExpiryScan()
- func (bc *BoltCache) Insert(key string, value []byte) error
- func (bc *BoltCache) InsertBatch(key string, value []byte) error
- func (bc *BoltCache) InsertTTL(key string, value []byte, ttl time.Duration) error
- func (bc *BoltCache) Name() string
- func (bc *BoltCache) Remove(key string) error
- func (bc *BoltCache) Retrieve(key string) ([]byte, error)
- func (bc *BoltCache) Start()
- func (bc *BoltCache) Stop()
- func (bc *BoltCache) TTL(key string) (time.Duration, error)
- type BoltCacheConfig
Constants ¶
View Source
const ( // Minimum Duration between full bucket scans looking for expired keys COMPACTION_SCAN_INTERVAL = 15 * time.Minute // Max number of keys to scan in a single DB Transaction COMPACTION_MAX_SCAN = 5000 )
Variables ¶
View Source
var ErrCompactionFinished = errors.New("compaction has finished")
View Source
var ErrCompactionInterupted = errors.New("compaction was interupted")
Functions ¶
This section is empty.
Types ¶
type BoltCache ¶
type BoltCache struct { *bolt_store.BoltStore *store_expiry.StoreExpiry *BoltCacheConfig }
func NewBoltCache ¶
func NewBoltCache(cfg *BoltCacheConfig) (*BoltCache, error)
type BoltCacheConfig ¶
type BoltCacheConfig struct { cache.CacheConfig // contains filtered or unexported fields }
func NewBoltCacheConfig ¶
func NewBoltCacheConfig(cacheConfig cache.CacheConfig, path string, bucketName string) *BoltCacheConfig
func (*BoltCacheConfig) RegisterFlags ¶
func (c *BoltCacheConfig) RegisterFlags(f *flag.FlagSet, cacheID string)
Click to show internal directories.
Click to hide internal directories.