cache

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache is the structure for the cache

func Init

func Init(config config.Configuration) *Cache

Init brings up the embedded store

func (*Cache) Count

func (cache *Cache) Count() (int, error)

Count retrieves the length of the partition

func (*Cache) Get

func (cache *Cache) Get(jti string) (time.Time, error)

Get retrieves a record and its expiry

func (*Cache) Put

func (cache *Cache) Put(jti string, expiresIn time.Duration) error

Put creates a new record or overrides it

func (*Cache) Query

func (cache *Cache) Query(iterate func(key string)) error

Query retrieves a cursor

Jump to

Keyboard shortcuts

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