marshaler

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaler

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

Marshaler is the struct that marshal and unmarshal cache values

func New

func New(cache cache.CacheInterface) *Marshaler

New creates a new marshaler that marshals/unmarshals cache values

func (*Marshaler) Clear

func (c *Marshaler) Clear() error

Clear reset all cache data

func (*Marshaler) Delete

func (c *Marshaler) Delete(key interface{}) error

Delete removes a value from the cache

func (*Marshaler) Get

func (c *Marshaler) Get(key interface{}, returnObj interface{}) (interface{}, error)

Get obtains a value from cache and unmarshal value with given object

func (*Marshaler) Invalidate

func (c *Marshaler) Invalidate(options store.InvalidateOptions) error

Invalidate invalidate cache values using given options

func (*Marshaler) Set

func (c *Marshaler) Set(key, object interface{}, options *store.Options) error

Set sets a value in cache by marshaling value

Jump to

Keyboard shortcuts

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