Documentation
¶
Index ¶
- type Cache
- type DummyCache
- func (cache *DummyCache) Clear() error
- func (cache *DummyCache) Decrease(key string) error
- func (cache *DummyCache) Delete(key string) error
- func (cache *DummyCache) Get(key string, val interface{}) error
- func (cache *DummyCache) GetMulti(keys map[string]interface{}) error
- func (cache *DummyCache) Increase(key string) error
- func (cache *DummyCache) IsExists(key string) (bool, error)
- func (cache *DummyCache) Set(key string, val interface{}, timeout time.Duration) error
- func (cache *DummyCache) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // Get value by key. Returns data.ErrNoMatch, if has no key. Get(key string, dst interface{}) error // GetMulti is a batch version of Get. GetMulti(dict map[string]interface{}) (notFound []string, err error) // Set value with key and expire time. Set(key string, val interface{}, timeout time.Duration) error // Check if value exists or not. IsExists(key string) (bool, error) // Delete cached value by key. Delete(key string) error // Increase cached int value by key, as a counter. Increase(key string) error // Decrease cached int value by key, as a counter. Decrease(key string) error // Clear cache. Clear() error // Stops the background worker. Stop() }
type DummyCache ¶
type DummyCache struct{}
func (*DummyCache) Clear ¶
func (cache *DummyCache) Clear() error
func (*DummyCache) Decrease ¶
func (cache *DummyCache) Decrease(key string) error
func (*DummyCache) Delete ¶
func (cache *DummyCache) Delete(key string) error
func (*DummyCache) Get ¶
func (cache *DummyCache) Get(key string, val interface{}) error
func (*DummyCache) GetMulti ¶
func (cache *DummyCache) GetMulti(keys map[string]interface{}) error
func (*DummyCache) Increase ¶
func (cache *DummyCache) Increase(key string) error
func (*DummyCache) Set ¶
func (cache *DummyCache) Set(key string, val interface{}, timeout time.Duration) error
func (*DummyCache) Stop ¶
func (cache *DummyCache) Stop()
Click to show internal directories.
Click to hide internal directories.