bytecache

package
v0.0.0-...-797e8bf Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2016 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package bytecache provides a redis backed bytecache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Provides a redis backed Cache.

func New

func New(client *redis.Client) *Cache

Create a new Cache instance with the given client.

func (*Cache) Get

func (c *Cache) Get(key string) ([]byte, error)

Get a stored value. A missing value will return nil, nil.

func (*Cache) Store

func (c *Cache) Store(key string, value []byte, timeout time.Duration) error

Store a value with the given timeout.

Jump to

Keyboard shortcuts

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