redis

package
v0.0.0-...-b8d825d Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage mechanism for caching strings in memory

func NewStorage

func NewStorage(url string) (*Storage, error)

NewStorage creates a new redis storage

func (Storage) Get

func (s Storage) Get(key string) []byte

Get a cached content by key

func (Storage) Set

func (s Storage) Set(key string, content []byte, duration time.Duration)

Set a cached content by key

Jump to

Keyboard shortcuts

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