Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStore ¶
type MemoryStore struct {
Cache *ttlcache.Cache
}
MemoryStore local memory cache store
func NewMemoryStore ¶
func NewMemoryStore(defaultExpiration time.Duration) *MemoryStore
NewMemoryStore allocate a local memory store with default expiration
func (*MemoryStore) Delete ¶
func (c *MemoryStore) Delete(key string) error
Delete remove key in memory store, do nothing if key doesn't exist
func (*MemoryStore) Get ¶
func (c *MemoryStore) Get(key string, value interface{}) error
Get get key in memory store, if key doesn't exist, return ErrCacheMiss
Click to show internal directories.
Click to hide internal directories.