Documentation ¶
Index ¶
- func Factory(otterCfg core.CacheProvider, logger core.Logger, stale time.Duration) (core.Storer, error)
- type Otter
- func (provider *Otter) Delete(key string)
- func (provider *Otter) DeleteMany(key string)
- func (provider *Otter) Get(key string) []byte
- func (provider *Otter) GetMultiLevel(key string, req *http.Request, validator *core.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Otter) Init() error
- func (provider *Otter) ListKeys() []string
- func (provider *Otter) MapKeys(prefix string) map[string]string
- func (provider *Otter) Name() string
- func (provider *Otter) Reset() error
- func (provider *Otter) Set(key string, value []byte, duration time.Duration) error
- func (provider *Otter) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- func (provider *Otter) Uuid() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Otter ¶
type Otter struct {
// contains filtered or unexported fields
}
Otter provider type.
func (*Otter) Delete ¶
Delete method will delete the response in Otter provider if exists corresponding to key param.
func (*Otter) DeleteMany ¶
DeleteMany method will delete the responses in Otter provider if exists corresponding to the regex key param.
func (*Otter) GetMultiLevel ¶
func (provider *Otter) 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.