Documentation ¶
Index ¶
- type Cache
- func (c *Cache) ClearAll() error
- func (c *Cache) Close() error
- func (c *Cache) Decr(key string) error
- func (c *Cache) Delete(key string) error
- func (c *Cache) Get(key string, val interface{}) error
- func (c *Cache) Incr(key string) error
- func (c *Cache) IsExist(key string) bool
- func (c *Cache) ListKey(req *cache.ListKeyRequest) (*cache.ListKeyResponse, error)
- func (c *Cache) Put(key string, val interface{}) error
- func (c *Cache) PutWithTTL(key string, val interface{}, ttl time.Duration) error
- func (c *Cache) SetDefaultTTL(ttl time.Duration)
- func (c *Cache) WithContext(ctx context.Context) cache.Cache
- type Config
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 缓存
func (*Cache) ListKey ¶
func (c *Cache) ListKey(req *cache.ListKeyRequest) (*cache.ListKeyResponse, error)
ListKey todo
func (*Cache) PutWithTTL ¶
PutWithTTL todo
type Config ¶
type Config struct { Prefix string `json:"prefix,omitempty" yaml:"prefix" toml:"prefix" env:"MCUBE_CACHE_PREFIX"` Address string `json:"address,omitempty" yaml:"address" toml:"address" env:"MCUBE_CACHE_ADDRESS"` DB int `json:"db,omitempty" yaml:"db" toml:"db" env:"MCUBE_CACHE_DB"` Password string `json:"password,omitempty" yaml:"password" toml:"password" env:"MCUBE_CACHE_PASSWORD"` DefaultTTL int `json:"default_ttl,omitempty" yaml:"default_ttl" toml:"default_ttl" env:"MCUBE_CACHE_TTL"` }
Config 配置
Click to show internal directories.
Click to hide internal directories.