Documentation ¶
Index ¶
- Constants
- type BadgerCache
- func (bc *BadgerCache) Close()
- func (bc *BadgerCache) ExpiryScan()
- func (bc *BadgerCache) Insert(key string, value []byte) error
- func (bc *BadgerCache) InsertTTL(key string, value []byte, ttl time.Duration) error
- func (bc *BadgerCache) Name() string
- func (bc *BadgerCache) Remove(key string) error
- func (bc *BadgerCache) Retrieve(key string) ([]byte, error)
- func (bc *BadgerCache) Start()
- func (bc *BadgerCache) Stop()
- func (bc *BadgerCache) TTL(key string) (time.Duration, error)
- type BadgerCacheConfig
Constants ¶
View Source
const ( // Minimum Duration between full bucket scans looking for expired keys COMPACTION_SCAN_INTERVAL = 15 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgerCache ¶
type BadgerCache struct { *badger_store.BadgerStore *store_expiry.StoreExpiry *BadgerCacheConfig }
func NewBadgerCache ¶
func NewBadgerCache(cfg *BadgerCacheConfig) (*BadgerCache, error)
func (*BadgerCache) Close ¶
func (bc *BadgerCache) Close()
func (*BadgerCache) ExpiryScan ¶
func (bc *BadgerCache) ExpiryScan()
Ran on interval by the StoreExpiry
func (*BadgerCache) Name ¶
func (bc *BadgerCache) Name() string
func (*BadgerCache) Remove ¶
func (bc *BadgerCache) Remove(key string) error
func (*BadgerCache) Start ¶
func (bc *BadgerCache) Start()
func (*BadgerCache) Stop ¶
func (bc *BadgerCache) Stop()
type BadgerCacheConfig ¶
type BadgerCacheConfig struct { cache.CacheConfig // contains filtered or unexported fields }
func NewBadgerCacheConfig ¶
func NewBadgerCacheConfig(cacheConfig cache.CacheConfig, path string) *BadgerCacheConfig
func (*BadgerCacheConfig) RegisterFlags ¶
func (c *BadgerCacheConfig) RegisterFlags(f *flag.FlagSet, cacheID string)
Click to show internal directories.
Click to hide internal directories.