bbolt

package
v1.1.0-beta2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bbolt is the bbolt implementation of the Trickster Cache

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL