Documentation
¶
Overview ¶
Package provider is the default hex/cache service provider.
It picks a cache backend based on config and binds it into the container. v1 only understands the memory backend; add a Backend hook to plug in Redis/memcached/etc. from your app.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Provider ¶
type Provider struct {
provider.Base
// Binding is the container name for the cache. Defaults to "cache".
Binding string
// Namespace is the config namespace read for cache settings.
// Defaults to "cache".
Namespace string
// Backend overrides the built-in backend selection. When set, the
// factory function runs and its return value is bound directly —
// the provider does not consult Namespace.driver in that case.
Backend func() cache.Cache
// contains filtered or unexported fields
}
Provider binds a cache.Cache into the container.
Click to show internal directories.
Click to hide internal directories.