redis

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL