redis

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromConnection

func FromConnection(client *redis.Client) cacher.Cacher

FromConnection creates redis-cache from existing redis-connection

func New

func New(opts ...Option) cacher.Cacher

New creates redis-cache instance

Types

type Option

type Option func(*Options)

Option closure

func Address

func Address(addr string) Option

Address closure to set field in Options

func DB

func DB(db int) Option

DB closure to set field in Options

func Password

func Password(password string) Option

Password closure to set field in Options

type Options

type Options struct {
	Address  string
	Password string
	DB       int
}

Options for creating redis-cacher

Jump to

Keyboard shortcuts

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