Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Client() *redis.Client
- func (c *Cache) Close() error
- func (c *Cache) Delete(ctx context.Context, key string) error
- func (c *Cache) Get(ctx context.Context, key string) (string, error)
- func (c *Cache) GetBytes(ctx context.Context, key string) ([]byte, error)
- func (c *Cache) GetInt64(ctx context.Context, key string) (int64, error)
- func (c *Cache) GetJSON(ctx context.Context, key string, v interface{}) error
- func (c *Cache) HDel(ctx context.Context, key, field string) error
- func (c *Cache) HGet(ctx context.Context, key, field string) (string, error)
- func (c *Cache) HGetAll(ctx context.Context, key string) (map[string]string, error)
- func (c *Cache) HSet(ctx context.Context, key, field, value string) error
- func (c *Cache) Incr(ctx context.Context, key string) (int64, error)
- func (c *Cache) Set(ctx context.Context, key, val string) error
- func (c *Cache) SetInt64(ctx context.Context, key string, val int64) error
- func (c *Cache) SetJSON(ctx context.Context, key string, val interface{}) error
- func (c *Cache) SetTTL(ctx context.Context, key string, ttl int64) error
- func (c *Cache) SetTimed(ctx context.Context, key, val string, ttl int64) error
- func (c *Cache) SetTimedInt64(ctx context.Context, key string, val int64, ttl int64) error
- func (c *Cache) SetTimedJSON(ctx context.Context, key string, val interface{}, ttl int64) error
- func (c *Cache) SetTimedJSONNX(ctx context.Context, key string, val interface{}, ttl int64) (bool, error)
- func (c *Cache) XAdd(ctx context.Context, stream string, maxLen int64, approx bool, ...) error
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
}
func (*Cache) SetTimedInt64 ¶
SetTimedInt64 set int64 value with expiration time in seconds
func (*Cache) SetTimedJSON ¶
func (*Cache) SetTimedJSONNX ¶ added in v1.7.0
Click to show internal directories.
Click to hide internal directories.