Documentation ¶
Index ¶
- type ICache
- type Memory
- func (m *Memory) Decr(key string) error
- func (m *Memory) Del(key string) error
- func (m *Memory) Expire(key string, dur time.Duration) error
- func (m *Memory) Get(key string) (string, error)
- func (m *Memory) GetClient() *Memory
- func (m *Memory) HDel(hk, key string) error
- func (m *Memory) HGet(hk, key string) (string, error)
- func (m *Memory) Incr(key string) error
- func (m *Memory) Set(key string, val interface{}, expiration time.Duration) error
- func (*Memory) Type() string
- type RedisCache
- func (c *RedisCache) Decr(key string) error
- func (c *RedisCache) Del(key string) error
- func (c *RedisCache) Expire(key string, expiration time.Duration) error
- func (c *RedisCache) Get(key string) (string, error)
- func (c *RedisCache) GetClient() redis.UniversalClient
- func (c *RedisCache) HDel(hk, fields string) error
- func (c *RedisCache) HGet(hk, field string) (string, error)
- func (c *RedisCache) Incr(key string) error
- func (c *RedisCache) Set(key string, val any, expiration time.Duration) error
- func (c *RedisCache) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICache ¶
type ICache interface { Type() string Get(key string) (string, error) Set(key string, val any, expiration time.Duration) error Del(key string) error HGet(hk, field string) (string, error) HDel(hk, fields string) error Incr(key string) error Decr(key string) error Expire(key string, expiration time.Duration) error }
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func (*RedisCache) Decr ¶
func (c *RedisCache) Decr(key string) error
func (*RedisCache) Del ¶
func (c *RedisCache) Del(key string) error
func (*RedisCache) GetClient ¶
func (c *RedisCache) GetClient() redis.UniversalClient
func (*RedisCache) HDel ¶
func (c *RedisCache) HDel(hk, fields string) error
func (*RedisCache) Incr ¶
func (c *RedisCache) Incr(key string) error
func (*RedisCache) Type ¶
func (c *RedisCache) Type() string
Click to show internal directories.
Click to hide internal directories.