redis

package
v1.2.19 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DriverName = "redis"

Variables

This section is empty.

Functions

func NewRedisCache

func NewRedisCache(cfg Config) (rds cache.Cache, err error)

func NewRedisCounter added in v1.2.8

func NewRedisCounter(cfg Config) (rds cache.Counter, err error)

func SetGlobalRedisKeyPrefix

func SetGlobalRedisKeyPrefix(key string)

Types

type Config

type Config struct {
	Address       string `json:"address,omitempty" yaml:"address,omitempty" xml:"address,omitempty"`
	Username      string `json:"username,omitempty" yaml:"username,omitempty" xml:"username,omitempty"`
	Password      string `json:"password,omitempty" yaml:"password,omitempty" xml:"password,omitempty"`
	DatabaseIndex int    `json:"database_index,omitempty" yaml:"database_index,omitempty" xml:"database_index,omitempty"`
	MaxRetries    int    `json:"max_retries,omitempty" yaml:"max_retries,omitempty" xml:"max_retries,omitempty"`
	TimeoutSecond int    `json:"timeout_second,omitempty" yaml:"timeout_second,omitempty" xml:"timeout_second,omitempty"`
	MaxLifeSecond int    `json:"max_life_second,omitempty" yaml:"max_life_second,omitempty" xml:"max_life_second,omitempty"`
	MaxOpen       int    `json:"max_open,omitempty" yaml:"max_open,omitempty" xml:"max_open,omitempty"`
	Prefix        string `json:"prefix,omitempty" yaml:"prefix,omitempty" xml:"prefix,omitempty"`
	KeySeparator  string `json:"key_separator,omitempty" yaml:"key_separator,omitempty" xml:"key_separator,omitempty"`
}

Jump to

Keyboard shortcuts

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