Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type MemoryCacheStore ¶ added in v0.9.1
type MemoryCacheStore struct {
// contains filtered or unexported fields
}
MemoryCache implements cache store based or lru cache
func NewMemoryCacheStore ¶ added in v0.9.1
func NewMemoryCacheStore(name string, valType interface{}, size int) (cache *MemoryCacheStore, err error)
NewMemoryCacheStore new memory cache store stored spec size
func (*MemoryCacheStore) Contains ¶ added in v0.9.1
func (mcs *MemoryCacheStore) Contains(key string) bool
Contains check existed in a memory cache store
func (*MemoryCacheStore) Delete ¶ added in v0.9.1
func (mcs *MemoryCacheStore) Delete(key string)
Delete delete key in a memory cache store
func (*MemoryCacheStore) Get ¶ added in v0.9.1
func (mcs *MemoryCacheStore) Get(key string) (val interface{}, ok bool)
Get get a key/value from memory cache store
func (*MemoryCacheStore) Set ¶ added in v0.9.1
func (mcs *MemoryCacheStore) Set(key string, val interface{}) (ok bool)
Set set a key/value to memory cache store
type RedisCacheStore ¶
type RedisCacheStore struct {
// contains filtered or unexported fields
}
RedisCacheStore based redis implement cache store
func (*RedisCacheStore) Contains ¶
func (rc *RedisCacheStore) Contains(key string) bool
Contains check key existed in redis cache store
func (*RedisCacheStore) Delete ¶
func (rc *RedisCacheStore) Delete(key string)
Delete delete key value in redis cache store
func (*RedisCacheStore) Get ¶
func (rc *RedisCacheStore) Get(key string) (val interface{}, ok bool)
Get get value from redis cache store
func (*RedisCacheStore) Set ¶
func (rc *RedisCacheStore) Set(key string, val interface{}) (ok bool)
Set add or update key value
Click to show internal directories.
Click to hide internal directories.