Documentation ¶
Index ¶
- func Factory(redisConfiguration core.CacheProvider, logger core.Logger, stale time.Duration) (core.Storer, error)
- type Redis
- func (provider *Redis) Delete(key string)
- func (provider *Redis) DeleteMany(key string)
- func (provider *Redis) Get(key string) []byte
- func (provider *Redis) GetMultiLevel(key string, req *http.Request, validator *core.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Redis) Init() error
- func (provider *Redis) ListKeys() []string
- func (provider *Redis) MapKeys(prefix string) map[string]string
- func (provider *Redis) Name() string
- func (provider *Redis) Reconnect()
- func (provider *Redis) Reset() error
- func (provider *Redis) Set(key string, value []byte, duration time.Duration) error
- func (provider *Redis) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- func (provider *Redis) Uuid() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis provider type.
func (*Redis) Delete ¶
Delete method will delete the response in Etcd provider if exists corresponding to key param.
func (*Redis) DeleteMany ¶
DeleteMany method will delete the responses in Redis provider if exists corresponding to the regex key param.
func (*Redis) GetMultiLevel ¶
func (provider *Redis) GetMultiLevel(key string, req *http.Request, validator *core.Revalidator) (fresh *http.Response, stale *http.Response)
GetMultiLevel tries to load the key and check if one of linked keys is a fresh/stale candidate.
Click to show internal directories.
Click to hide internal directories.