Documentation
¶
Overview ¶
Package redis contains the concrete implementation of a cache that supports TTL.
Index ¶
- type Cache
- func (c *Cache) Get(ctx context.Context, key string) (interface{}, bool, error)
- func (c *Cache) Purge(ctx context.Context) error
- func (c *Cache) Remove(ctx context.Context, key string) error
- func (c *Cache) Set(ctx context.Context, key string, value interface{}) error
- func (c *Cache) SetTTL(ctx context.Context, key string, value interface{}, ttl time.Duration) 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
}
Cache encapsulates a Redis-based caching mechanism.
func (*Cache) Get ¶
Get executes a lookup and returns whether a key exists in the cache along with its value.
Click to show internal directories.
Click to hide internal directories.