Documentation ¶
Index ¶
- func NewSsdbCache(conn *ssdb.Client, opts ...CacheOptions) cache.Cache
- type Cache
- func (rc *Cache) ClearAll(context.Context) error
- func (rc *Cache) Decr(ctx context.Context, key string) error
- func (rc *Cache) DelMulti(keys []string) error
- func (rc *Cache) Delete(ctx context.Context, key string) error
- func (rc *Cache) Get(ctx context.Context, key string) (interface{}, error)
- func (rc *Cache) GetMulti(ctx context.Context, keys []string) ([]interface{}, error)
- func (rc *Cache) Incr(ctx context.Context, key string) error
- func (rc *Cache) IsExist(ctx context.Context, key string) (bool, error)
- func (rc *Cache) Put(ctx context.Context, key string, val interface{}, timeout time.Duration) error
- func (rc *Cache) Scan(keyStart string, keyEnd string, limit int) ([]string, error)
- type CacheOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSsdbCache ¶
func NewSsdbCache(conn *ssdb.Client, opts ...CacheOptions) cache.Cache
NewSsdbCache creates new ssdb adapter.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache SSDB adapter
func (*Cache) ClearAll ¶
ClearAll clears all cached items in ssdb. If there are many keys, this method may spent much time.
type CacheOptions ¶
type CacheOptions func(c *Cache)
func CacheWithConninfo ¶
func CacheWithConninfo(conninfo []string) CacheOptions
CacheWithConninfo configures conninfo for ssdb
Click to show internal directories.
Click to hide internal directories.