Documentation ¶
Index ¶
- Variables
- func New(config *Configuration) contract.Cache
- func NewRepository(store contract.CacheStore) contract.CacheSerializable
- type Cache
- func (c *Cache) Add(key string, value interface{}, expire time.Time) error
- func (c *Cache) AddEncode(key string, value interface{}, expire time.Time) error
- func (c *Cache) Decrement(key string, steps ...int64) error
- func (c *Cache) Driver(driver string) contract.CacheSerializable
- func (c *Cache) Flush() error
- func (c *Cache) Forever(key string, value interface{}) error
- func (c *Cache) ForeverEncode(key string, value interface{}) error
- func (c *Cache) Forget(key string) error
- func (c *Cache) Get(key string) (interface{}, error)
- func (c *Cache) GetDecode(key string, to interface{}) (interface{}, error)
- func (c *Cache) GetDefault(key string, defaultValue interface{}) (interface{}, error)
- func (c *Cache) Has(key string) bool
- func (c *Cache) Increment(key string, steps ...int64) error
- func (c *Cache) Pull(key string) (interface{}, error)
- func (c *Cache) PullDefault(key string, defaultValue interface{}) (interface{}, error)
- func (c *Cache) Put(key string, value interface{}, expire time.Time) error
- func (c *Cache) PutEncode(key string, value interface{}, expire time.Time) error
- func (c *Cache) Register(driver string, store contract.CacheStore)
- func (c *Cache) Store() contract.CacheStore
- type Configuration
- type Provider
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDriverNotFound = errors.New(`driver not found`)
)
Functions ¶
func NewRepository ¶
func NewRepository(store contract.CacheStore) contract.CacheSerializable
Create a new cache repository
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) Driver ¶
func (c *Cache) Driver(driver string) contract.CacheSerializable
Get the cache driver of the finger
func (*Cache) ForeverEncode ¶
func (*Cache) GetDefault ¶
func (*Cache) PullDefault ¶
func (*Cache) Register ¶
func (c *Cache) Register(driver string, store contract.CacheStore)
Register driver
func (*Cache) Store ¶
func (c *Cache) Store() contract.CacheStore
type Configuration ¶
Click to show internal directories.
Click to hide internal directories.