filesystem

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package filesystem is the filesystem 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 *config.CachingConfig
	Index  *index.Index
}

Cache describes a Filesystem 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 is not used for Cache

func (*Cache) Configuration

func (c *Cache) Configuration() *config.CachingConfig

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) Remove

func (c *Cache) Remove(cacheKey string)

Remove removes an object from the cache

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) 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

Jump to

Keyboard shortcuts

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