redis

package
v0.0.0-...-1a5deed Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(options Options) cache.Cache

NewClient creates a new version of the cache

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a redis client

func (*Client) Get

func (client *Client) Get(key string) (result string, err error)

Get gets a value from the cache

func (*Client) Set

func (client *Client) Set(key string, value string, expiration time.Duration) error

Set is responsible for setting a value in the cache

type Options

type Options struct {
	Address  string
	Password string
	DB       int
}

Options are the params for initializing the class

Jump to

Keyboard shortcuts

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