Documentation ¶
Index ¶
- Variables
- func Add(key string, data interface{}, d time.Duration) bool
- func Decrement(key string) bool
- func Forever(key string, data interface{}) error
- func Get(key string, object interface{}) (c.Value, bool)
- func Has(key string) bool
- func Increment(key string) bool
- func Put(key string, data interface{}, d time.Duration) error
- func Remove(key string) bool
- func Resolve(name string, dr DriverResolver)
- func ResolveDriver(name string, config yaml.Node, sc StoreConfig) (cache.Repository, error)
- func Use(driver string) error
- type CacheConfig
- type DriverResolver
- type RedisConfig
- type Service
- type StoreConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Default *c.Manager
View Source
var RepositoryType = reflect.TypeOf((*c.Repository)(nil)).Elem()
Functions ¶
func Resolve ¶ added in v0.0.7
func Resolve(name string, dr DriverResolver)
func ResolveDriver ¶ added in v0.0.7
func ResolveDriver(name string, config yaml.Node, sc StoreConfig) (cache.Repository, error)
Types ¶
type CacheConfig ¶ added in v0.0.5
type CacheConfig struct { Store string `yaml:"store" env:"CACHE_STORE" default:"go_cache"` Prefix string `yaml:"prefix" env:"CACHE_PREFIX"` Stores map[string]StoreConfig `yaml:"stores"` }
type DriverResolver ¶ added in v0.0.7
type DriverResolver func(conf yaml.Node, sc StoreConfig) (cache.Repository, error)
type RedisConfig ¶ added in v0.0.7
type RedisConfig struct {
Connection string `yaml:"connection"`
}
type StoreConfig ¶ added in v0.0.7
Click to show internal directories.
Click to hide internal directories.