rediscache

package
v0.0.0-...-2f1e84d Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package rediscache provides an implementation of httpcache.Cache that stores and retrieves data using Redis.

Index

Constants

This section is empty.

Variables

View Source
var (
	PluginConfig = &rediscacheConfig{
		done: make(chan struct{}),
	}
)

Config ...

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Client     *redis.Client
	Expiration time.Duration
}

Cache objects store and retrieve data using Redis.

func New

func New(c *redis.Client, exp time.Duration) *Cache

New returns a new Cache

func (*Cache) Action

func (c *Cache) Action(name string, args ...interface{}) (map[string]*interface{}, error)

func (*Cache) Debug

func (c *Cache) Debug(action string)

func (*Cache) Delete

func (c *Cache) Delete(key string)

func (*Cache) Get

func (c *Cache) Get(key string) (resp []byte, ok bool)

func (*Cache) Indexes

func (c *Cache) Indexes()

func (*Cache) Set

func (c *Cache) Set(key string, content []byte)

Directories

Path Synopsis
Package redis provides a redis interface for http caching.
Package redis provides a redis interface for http caching.

Jump to

Keyboard shortcuts

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