Documentation ¶
Overview ¶
package store implements the neteaseapi store interface
Index ¶
- type InMemStore
- func (s *InMemStore) Add(k string, v interface{}, d time.Duration) error
- func (s *InMemStore) Delete(k string)
- func (s *InMemStore) DeleteExpired()
- func (s *InMemStore) Flush()
- func (s *InMemStore) Get(k string) (interface{}, bool)
- func (s *InMemStore) ItemCount() int
- func (s *InMemStore) Set(k string, v interface{}, d time.Duration)
- func (s *InMemStore) SetDefault(k string, v interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemStore ¶
type InMemStore struct { Store *cache.Cache DefaultExpiration time.Duration CleanupInterval time.Duration }
func Default ¶
func Default() *InMemStore
func New ¶
func New(defaultExp, cleanInterval time.Duration) *InMemStore
func (*InMemStore) Delete ¶
func (s *InMemStore) Delete(k string)
func (*InMemStore) DeleteExpired ¶
func (s *InMemStore) DeleteExpired()
func (*InMemStore) Flush ¶
func (s *InMemStore) Flush()
func (*InMemStore) Get ¶
func (s *InMemStore) Get(k string) (interface{}, bool)
func (*InMemStore) ItemCount ¶
func (s *InMemStore) ItemCount() int
func (*InMemStore) SetDefault ¶
func (s *InMemStore) SetDefault(k string, v interface{})
Click to show internal directories.
Click to hide internal directories.