cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache implements a cache for collection data

func New

func New(channelID string, dbProvider api.DBProvider, size int) *Cache

New returns a new collection data cache

func (*Cache) Delete

func (c *Cache) Delete(ns, coll, key string)

Delete deletes the given key.

func (*Cache) Get

func (c *Cache) Get(ns, coll, key string) (*api.Value, error)

Get returns the values for the given keys

func (*Cache) GetMultiple

func (c *Cache) GetMultiple(ns, coll string, keys ...string) ([]*api.Value, error)

GetMultiple returns the values for the given keys

func (*Cache) Put

func (c *Cache) Put(ns, coll, key string, value *api.Value)

Put adds the value for the given key.

Jump to

Keyboard shortcuts

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