Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalOptions ¶
type LocalOptions struct { // Entries contains the number of // items to keep in-memory locally. Entries int // Ttl is the lifespan of the item. Ttl time.Duration }
LocalOptions are used by TinyLFU cache
type RedisCache ¶
type RedisCache struct {
*cache.Cache
}
RedisCache wraps redis cache client.
func New ¶
func New(opt *LocalOptions, cpool *credis.ClusterPool) *RedisCache
New creates a redis cache on top of ClusterClient. Struct encoding can be fine tunned with additional tags: https://msgpack.uptrace.dev/guide/#struct-tags.
Click to show internal directories.
Click to hide internal directories.