Documentation ¶
Index ¶
- type Marshaler
- func (c *Marshaler) Clear(ctx context.Context) error
- func (c *Marshaler) Delete(ctx context.Context, key interface{}) error
- func (c *Marshaler) Get(ctx context.Context, key interface{}, returnObj interface{}) (interface{}, error)
- func (c *Marshaler) Invalidate(ctx context.Context, options store.InvalidateOptions) error
- func (c *Marshaler) Set(ctx context.Context, key, object interface{}, options *store.Options) error
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) Get ¶
func (c *Marshaler) Get(ctx context.Context, key interface{}, returnObj interface{}) (interface{}, error)
Get obtains a value from cache and unmarshal value with given object
func (*Marshaler) Invalidate ¶
Invalidate invalidate cache values using given options
Click to show internal directories.
Click to hide internal directories.