Documentation
¶
Index ¶
- Constants
- func CacheConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
- func NewStorages(configuration configurationtypes.AbstractConfigurationInterface) ([]types.Storer, error)
- type Cache
- func (provider *Cache) Delete(key string)
- func (provider *Cache) DeleteMany(key string)
- func (provider *Cache) Get(key string) []byte
- func (provider *Cache) GetMultiLevel(key string, req *http.Request, validator *rfc.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Cache) Init() error
- func (provider *Cache) ListKeys() []string
- func (provider *Cache) MapKeys(prefix string) map[string]string
- func (provider *Cache) Name() string
- func (provider *Cache) Prefix(key string) []string
- func (provider *Cache) Reset() error
- func (provider *Cache) Set(key string, value []byte, url t.URL, duration time.Duration) error
- func (provider *Cache) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- type StorerInstanciator
Constants ¶
View Source
const ( StalePrefix = "STALE_" MappingKeyPrefix = "IDX_" )
Variables ¶
This section is empty.
Functions ¶
func CacheConnectionFactory ¶
func CacheConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
CacheConnectionFactory function create new Cache instance
func NewStorages ¶
func NewStorages(configuration configurationtypes.AbstractConfigurationInterface) ([]types.Storer, error)
Types ¶
type Cache ¶
type Cache struct { *cache.Cache // contains filtered or unexported fields }
Cache provider type
func (*Cache) Delete ¶
Delete method will delete the response in Cache provider if exists corresponding to key param
func (*Cache) DeleteMany ¶
DeleteMany method will delete the responses in Cache provider if exists corresponding to the regex key param
func (*Cache) GetMultiLevel ¶
type StorerInstanciator ¶
type StorerInstanciator func(configurationtypes.AbstractConfigurationInterface) (types.Storer, error)
func NewStorageFromName ¶
func NewStorageFromName(_ string) (StorerInstanciator, error)
Click to show internal directories.
Click to hide internal directories.