Documentation
¶
Index ¶
- Constants
- Variables
- func CloseConnPool()
- func InitConnPool(cfg *config.Cache)
- func Marshal(value interface{}) ([]byte, error)
- func NewConnPoolContext(ctx context.Context) (context.Context, context.CancelFunc)
- func Unmarshal(b []byte, value interface{}) error
- type BigCache
- func (impl *BigCache) Decr(ctx context.Context, key string) error
- func (impl *BigCache) Del(ctx context.Context, key string) error
- func (impl *BigCache) Exist(ctx context.Context, key string) bool
- func (impl *BigCache) Get(ctx context.Context, key string, value interface{}) error
- func (impl *BigCache) GetInt(ctx context.Context, key string, value *int) error
- func (impl *BigCache) GetInt64(ctx context.Context, key string, value *int64) error
- func (impl *BigCache) GetString(ctx context.Context, key string, value *string) error
- func (impl *BigCache) Incr(ctx context.Context, key string) error
- func (impl *BigCache) Keys(ctx context.Context, cursor uint64, pattern string, batchSize int64) ([]string, uint64, bool, error)
- func (impl *BigCache) SafeDecr(ctx context.Context, key string) error
- func (impl *BigCache) Set(ctx context.Context, item *Item) error
- func (impl *BigCache) SetInt(ctx context.Context, item *Item) error
- func (impl *BigCache) SetInt64(ctx context.Context, item *Item) error
- func (impl *BigCache) SetString(ctx context.Context, item *Item) error
- type Item
- type RedisClientConnPool
Constants ¶
View Source
const (
DefaultTTL = time.Minute
)
Variables ¶
View Source
var (
ErrCacheMiss = errors.New("big_cache: key/value is not cached")
)
Functions ¶
func CloseConnPool ¶
func CloseConnPool()
func InitConnPool ¶
func NewConnPoolContext ¶
Types ¶
type BigCache ¶
type BigCache struct {
// contains filtered or unexported fields
}
func InstallBigCache ¶
func InstallBigCache(pool *RedisClientConnPool) *BigCache
type RedisClientConnPool ¶
type RedisClientConnPool struct {
// contains filtered or unexported fields
}
func GetConnPool ¶
func GetConnPool() *RedisClientConnPool
func (*RedisClientConnPool) GetBigCache ¶
func (p *RedisClientConnPool) GetBigCache() *BigCache
Click to show internal directories.
Click to hide internal directories.