Version: v1.1.5 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0



Package bbolt is the bbolt implementation of the Trickster Cache



This section is empty.


This section is empty.


This section is empty.


type Cache

type Cache struct {
	Name   string
	Config *options.Options
	Logger *log.Logger
	Index  *index.Index
	// contains filtered or unexported fields

Cache describes a BBolt Cache

func (*Cache) BulkRemove

func (c *Cache) BulkRemove(cacheKeys []string)

BulkRemove removes a list of objects from the cache

func (*Cache) Close

func (c *Cache) Close() error

Close closes the Cache

func (*Cache) Configuration

func (c *Cache) Configuration() *options.Options

Configuration returns the Configuration for the Cache object

func (*Cache) Connect

func (c *Cache) Connect() error

Connect instantiates the Cache mutex map and starts the Expired Entry Reaper goroutine

func (*Cache) Locker

func (c *Cache) Locker() locks.NamedLocker

Locker returns the cache's locker

func (*Cache) Remove

func (c *Cache) Remove(cacheKey string)

Remove removes an object in cache, if present

func (*Cache) Retrieve

func (c *Cache) Retrieve(cacheKey string, allowExpired bool) ([]byte, status.LookupStatus, error)

Retrieve looks for an object in cache and returns it (or an error if not found)

func (*Cache) SetLocker

func (c *Cache) SetLocker(l locks.NamedLocker)

SetLocker sets the cache's locker

func (*Cache) SetTTL

func (c *Cache) SetTTL(cacheKey string, ttl time.Duration)

SetTTL updates the TTL for the provided cache object

func (*Cache) Store

func (c *Cache) Store(cacheKey string, data []byte, ttl time.Duration) error

Store places an object in the cache using the specified key and ttl

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to