cache

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFromCache

func IsFromCache(ctx context.Context, obj interface{}) bool

IsFromCache returns true if the object is from the cache

func NewComponent

func NewComponent(ctx context.Context, typ string) (*wtype.Liquid, error)

NewComponent returns a new component of the given type

func NewContext

func NewContext(ctx context.Context, pc Cache) context.Context

NewContext returns a context with the new cache

func NewPlate

func NewPlate(ctx context.Context, typ string) (*wtype.Plate, error)

NewPlate returns a new plate of the given type

func NewTipbox

func NewTipbox(ctx context.Context, typ string) (*wtype.LHTipbox, error)

NewTipbox returns a new tipbox of the given type

func NewTipwaste

func NewTipwaste(ctx context.Context, typ string) (*wtype.LHTipwaste, error)

NewTipwaste returns a new tipwaste of the given type

func ReturnObject

func ReturnObject(ctx context.Context, obj interface{}) error

ReturnObject return an object to the cache to be cleaned

Types

type Cache

type Cache interface {
	inventory.Inventory
	ReturnObject(ctx context.Context, obj interface{}) error
	IsFromCache(ctx context.Context, obj interface{}) bool
}

func GetCache

func GetCache(ctx context.Context) Cache

GetCache returns the plate cache from the context

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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