Documentation ¶
Index ¶
- func New(opts cache.Options) (cache.Cache, error)
- func ParseSentinelURL(redisURL string) (*redis.FailoverOptions, error)
- type Cache
- func (c *Cache) Contains(ctx context.Context, key string) bool
- func (c *Cache) Delete(ctx context.Context, key string) error
- func (c *Cache) Fetch(ctx context.Context, key string, value interface{}) error
- func (c *Cache) Ping(ctx context.Context) error
- func (c *Cache) Save(ctx context.Context, key string, value interface{}, ...) error
- func (c *Cache) Scan(ctx context.Context, match string) (cache.Iterator, error)
- type ScanIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSentinelURL ¶
ParseSentinelURL parses sentinel url to redis FailoverOptions. It's a modified version of go-redis ParseURL(https://github.com/go-redis/redis/blob/997118894af9d4244d4a471f2b317eead9c9ca62/options.go#L222) because official version does not support parse sentinel mode.
Types ¶
type Cache ¶
type Cache struct { *redis.Client // contains filtered or unexported fields }
Cache redis cache
type ScanIterator ¶
type ScanIterator struct {
// contains filtered or unexported fields
}
ScanIterator is a wrapper for redis ScanIterator
Click to show internal directories.
Click to hide internal directories.