beego: Index | Files

package ssdb

import ""


Package Files


func NewSsdbCache Uses

func NewSsdbCache() cache.Cache

NewSsdbCache creates new ssdb adapter.

type Cache Uses

type Cache struct {
    // contains filtered or unexported fields

Cache SSDB adapter

func (*Cache) ClearAll Uses

func (rc *Cache) ClearAll(context.Context) error

ClearAll clears all cached items in memcache.

func (*Cache) Decr Uses

func (rc *Cache) Decr(ctx context.Context, key string) error

Decr decrements a key's counter.

func (*Cache) DelMulti Uses

func (rc *Cache) DelMulti(keys []string) error

DelMulti deletes one or more keys from memcache

func (*Cache) Delete Uses

func (rc *Cache) Delete(ctx context.Context, key string) error

Delete deletes a value in memcache.

func (*Cache) Get Uses

func (rc *Cache) Get(ctx context.Context, key string) (interface{}, error)

Get gets a key's value from memcache.

func (*Cache) GetMulti Uses

func (rc *Cache) GetMulti(ctx context.Context, keys []string) ([]interface{}, error)

GetMulti gets one or keys values from ssdb.

func (*Cache) Incr Uses

func (rc *Cache) Incr(ctx context.Context, key string) error

Incr increases a key's counter.

func (*Cache) IsExist Uses

func (rc *Cache) IsExist(ctx context.Context, key string) (bool, error)

IsExist checks if a key exists in memcache.

func (*Cache) Put Uses

func (rc *Cache) Put(ctx context.Context, key string, val interface{}, timeout time.Duration) error

Put puts value into memcache. value: must be of type string

func (*Cache) Scan Uses

func (rc *Cache) Scan(keyStart string, keyEnd string, limit int) ([]string, error)

Scan key all cached in ssdb.

func (*Cache) StartAndGC Uses

func (rc *Cache) StartAndGC(config string) error

StartAndGC starts the memcache adapter. config: must be in the format {"conn":"connection info"}. If an error occurs during connection, an error is returned

Package ssdb imports 9 packages (graph) and is imported by 1 packages. Updated 2020-12-01. Refresh now. Tools for package owners.