keyvaluestorecache

package
v0.0.0-...-ba1b225 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 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 ReadCache

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

Read cache caches reads permanently, or until they're invalidated by a write operation on the cache.

func NewReadCache

func NewReadCache(b keyvaluestore.Backend) *ReadCache

func (*ReadCache) AddInt

func (c *ReadCache) AddInt(key string, n int64) (int64, error)

func (*ReadCache) AtomicWrite

func (c *ReadCache) AtomicWrite() keyvaluestore.AtomicWriteOperation

func (*ReadCache) Batch

func (*ReadCache) CAS

func (c *ReadCache) CAS(key string, transform func(v *string) (interface{}, error)) (success bool, err error)

func (*ReadCache) Delete

func (c *ReadCache) Delete(key string) (success bool, err error)

func (*ReadCache) Get

func (c *ReadCache) Get(key string) (*string, error)

func (*ReadCache) Invalidate

func (c *ReadCache) Invalidate(key string)

func (*ReadCache) SAdd

func (c *ReadCache) SAdd(key string, member interface{}, members ...interface{}) error

func (*ReadCache) SMembers

func (c *ReadCache) SMembers(key string) ([]string, error)

func (*ReadCache) SRem

func (c *ReadCache) SRem(key string, member interface{}, members ...interface{}) error

func (*ReadCache) Set

func (c *ReadCache) Set(key string, value interface{}) error

func (*ReadCache) SetNX

func (c *ReadCache) SetNX(key string, value interface{}) (bool, error)

func (*ReadCache) SetXX

func (c *ReadCache) SetXX(key string, value interface{}) (bool, error)

func (*ReadCache) WithBackend

func (c *ReadCache) WithBackend(b keyvaluestore.Backend) *ReadCache

Returns a new ReadCache that shares the receiver's underlying cache.

func (*ReadCache) WithEventuallyConsistentReads

func (c *ReadCache) WithEventuallyConsistentReads() *ReadCache

Returns a new ReadCache suitable for eventually consistent reads. Reads on the returned cache will not impact the reads of ancestors with strong consistency. Additionally, the cache will take advantage of the fact that items that would have been invalidated by writes may still be returned for eventually consistent reads.

func (*ReadCache) ZAdd

func (c *ReadCache) ZAdd(key string, member interface{}, score float64) error

func (*ReadCache) ZCount

func (c *ReadCache) ZCount(key string, min, max float64) (int, error)

func (*ReadCache) ZIncrBy

func (c *ReadCache) ZIncrBy(key string, member string, n float64) (float64, error)

func (*ReadCache) ZLexCount

func (c *ReadCache) ZLexCount(key string, min, max string) (int, error)

func (*ReadCache) ZRangeByLex

func (c *ReadCache) ZRangeByLex(key string, min, max string, limit int) ([]string, error)

func (*ReadCache) ZRangeByScore

func (c *ReadCache) ZRangeByScore(key string, min, max float64, limit int) ([]string, error)

func (*ReadCache) ZRangeByScoreWithScores

func (c *ReadCache) ZRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)

func (*ReadCache) ZRem

func (c *ReadCache) ZRem(key string, member interface{}) error

func (*ReadCache) ZRevRangeByLex

func (c *ReadCache) ZRevRangeByLex(key string, min, max string, limit int) ([]string, error)

func (*ReadCache) ZRevRangeByScore

func (c *ReadCache) ZRevRangeByScore(key string, min, max float64, limit int) ([]string, error)

func (*ReadCache) ZRevRangeByScoreWithScores

func (c *ReadCache) ZRevRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)

func (*ReadCache) ZScore

func (c *ReadCache) ZScore(key string, member interface{}) (*float64, error)

Jump to

Keyboard shortcuts

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