Documentation ¶
Index ¶
- func NewCache(url *url.URL) (cache.Cache, error)
- type Cache
- func (c *Cache) Close() error
- func (c *Cache) Delete(ctx context.Context, key string) error
- func (c *Cache) Exist(ctx context.Context, key string) bool
- func (c *Cache) Get(ctx context.Context, key string) ([]byte, error)
- func (c *Cache) GetFloat(ctx context.Context, key string) (float64, error)
- func (c *Cache) GetInt(ctx context.Context, key string) (int64, error)
- func (c *Cache) GetObject(ctx context.Context, key string, doc interface{}) error
- func (c *Cache) GetString(ctx context.Context, key string) (string, error)
- func (c *Cache) RemainingTime(ctx context.Context, key string) int
- func (c *Cache) Set(ctx context.Context, key string, value interface{}, expiration int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache redis cache object
func NewRedisCache ¶
NewRedisCache creating instance of redis cache
func (*Cache) RemainingTime ¶
RemainingTime get remaining time
Click to show internal directories.
Click to hide internal directories.