marshaler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: MIT Imports: 3 Imported by: 4

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 added in v1.0.0

func (c *Marshaler) Clear() error

Clear reset all cache data

func (*Marshaler) Delete added in v0.2.0

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 added in v0.2.0

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