Documentation ¶
Index ¶
- type CacheFetcher
- type Client
- type Options
- type SampleCacheClientImpl
- func (i *SampleCacheClientImpl) Del(key string) error
- func (i *SampleCacheClientImpl) Get(key string, dst interface{}) error
- func (i *SampleCacheClientImpl) GetString(key string) (string, error)
- func (i *SampleCacheClientImpl) IsFoundKey(err error) bool
- func (i *SampleCacheClientImpl) Set(key string, value interface{}, expiration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheFetcher ¶
type CacheFetcher interface { SetKey(prefixes []string, useHash bool, elements ...string) Fetch(expiration time.Duration, dst interface{}, fetcher interface{}) (interface{}, error) SetVal(value interface{}, expiration time.Duration) error GetString() (string, error) GetVal(dst interface{}) (interface{}, error) DelVal() error Key() string IsCached() bool }
func NewCacheFetcher ¶
func NewCacheFetcher(client Client, options *Options) CacheFetcher
type SampleCacheClientImpl ¶
func (*SampleCacheClientImpl) Del ¶
func (i *SampleCacheClientImpl) Del(key string) error
func (*SampleCacheClientImpl) Get ¶
func (i *SampleCacheClientImpl) Get(key string, dst interface{}) error
func (*SampleCacheClientImpl) GetString ¶
func (i *SampleCacheClientImpl) GetString(key string) (string, error)
func (*SampleCacheClientImpl) IsFoundKey ¶
func (i *SampleCacheClientImpl) IsFoundKey(err error) bool
return a decision when key exists.
Click to show internal directories.
Click to hide internal directories.