Documentation
¶
Overview ¶
Package redis provides a cache implementation of onecache using redis as the backend
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(r *RedisStore)
Option is a redis option type
func CacheKeyGenerator ¶
CacheKeyGenerator allows configuring the cache key generation process
func ClientOptions ¶
ClientOptions is an Option type that allows configuring a redis client
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) *RedisStore
New returns a new RedisStore by applying all options passed into it It also sets sensible defaults too
func NewRedisStore ¶
func NewRedisStore(opts *redis.Options, prefix string) *RedisStore
Deprecated -- Use New instead Returns a new instance of the RedisStore If prefix is an empty string, the default cache prefix is used
func (*RedisStore) Delete ¶
func (r *RedisStore) Delete(key string) error
func (*RedisStore) Flush ¶
func (r *RedisStore) Flush() error
func (*RedisStore) Has ¶
func (r *RedisStore) Has(key string) bool
Click to show internal directories.
Click to hide internal directories.