Documentation ¶
Index ¶
- func NewGoCache() cache.Cache
- type Cache
- func (rc *Cache) ClearAll() error
- func (rc *Cache) Decr(key string) error
- func (rc *Cache) DecrBy(key string) (interface{}, error)
- func (rc *Cache) Delete(key string) error
- func (rc *Cache) Expire(key string, timeout time.Duration) error
- func (rc *Cache) Get(key string) interface{}
- func (rc *Cache) GetMulti(keys []string) []interface{}
- func (rc *Cache) Incr(key string) error
- func (rc *Cache) IncrBy(key string) (interface{}, error)
- func (rc *Cache) IsExist(key string) bool
- func (rc *Cache) Put(key string, val interface{}, timeout time.Duration) error
- func (rc *Cache) Set(key string, val interface{}) (bool, error)
- func (rc *Cache) StartAndGC(config cache.Config) error
- func (rc *Cache) TryLock(key string, val interface{}, timeout time.Duration) error
- func (rc *Cache) UnLock(key string, val interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGoCache ¶
NewGoCache create new go-cache with default collection name.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is go-cache adapter.
func (*Cache) StartAndGC ¶
StartAndGC start go-cache adapter. the cache item in go-cache are only in memory, so no gc operation.
Click to show internal directories.
Click to hide internal directories.