Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCacheMiss = errors.New("key miss")
Functions ¶
This section is empty.
Types ¶
type BigCacheCache ¶
type BigCacheCache struct {
// contains filtered or unexported fields
}
func (*BigCacheCache) Remove ¶
func (c *BigCacheCache) Remove(key string)
func (*BigCacheCache) Set ¶
func (c *BigCacheCache) Set(key string, value []byte)
type BufferedMsgPackCoder ¶
type BufferedMsgPackCoder struct {
// contains filtered or unexported fields
}
func (*BufferedMsgPackCoder) Decode ¶
func (b *BufferedMsgPackCoder) Decode(buf []byte, value interface{}) error
func (*BufferedMsgPackCoder) Encode ¶
func (b *BufferedMsgPackCoder) Encode(value interface{}) ([]byte, error)
type CCacheCache ¶
type CCacheCache struct {
// contains filtered or unexported fields
}
func (*CCacheCache) Remove ¶
func (c *CCacheCache) Remove(key string)
func (*CCacheCache) Set ¶
func (c *CCacheCache) Set(key string, value []byte)
type Client ¶
type Coder ¶
type Coder interface { Decode(buf []byte, value interface{}) error Encode(value interface{}) ([]byte, error) }
func NewBufferedMsgPackCoder ¶
func NewBufferedMsgPackCoder() Coder
type Config ¶
type Config struct { Coder Coder Local LocalCache Remote RemoteCache }
type FreeCacheCache ¶
type FreeCacheCache struct {
// contains filtered or unexported fields
}
func (*FreeCacheCache) Remove ¶
func (c *FreeCacheCache) Remove(key string)
func (*FreeCacheCache) Set ¶
func (c *FreeCacheCache) Set(key string, value []byte)
type LocalCache ¶
type LocalCache interface { Get(key string) ([]byte, bool) Set(key string, value []byte) Remove(key string) }
func NewBigCacheCache ¶
func NewBigCacheCache() LocalCache
func NewCCacheCache ¶
func NewCCacheCache() LocalCache
func NewFreeCacheCache ¶
func NewFreeCacheCache() LocalCache
func NewRistrettoCache ¶
func NewRistrettoCache() LocalCache
func NewSimpleLRUCache ¶
func NewSimpleLRUCache() LocalCache
type RedisCache ¶
type RemoteCache ¶
type RistrettoCache ¶
type RistrettoCache struct {
// contains filtered or unexported fields
}
func (*RistrettoCache) Remove ¶
func (c *RistrettoCache) Remove(key string)
func (*RistrettoCache) Set ¶
func (c *RistrettoCache) Set(key string, value []byte)
type SimpleLRUCache ¶
type SimpleLRUCache struct {
// contains filtered or unexported fields
}
func (*SimpleLRUCache) Remove ¶
func (c *SimpleLRUCache) Remove(key string)
func (*SimpleLRUCache) Set ¶
func (c *SimpleLRUCache) Set(key string, value []byte)
type VanillaMsgPackCoder ¶
type VanillaMsgPackCoder struct{}
func (VanillaMsgPackCoder) Decode ¶
func (VanillaMsgPackCoder) Decode(buf []byte, value interface{}) error
func (VanillaMsgPackCoder) Encode ¶
func (VanillaMsgPackCoder) Encode(value interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.