cache

package
v0.0.0-...-27b812d Latest Latest
Warning

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

Go to latest
Published: May 29, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheInterface

type CacheInterface interface {
	ServeCached(w http.ResponseWriter, r *http.Request, key string, handler RecacheHandler)
	DeleteCache(key string)
	Cache(key string, body string)
	Close()
}

func NewFileCache

func NewFileCache() CacheInterface

func NewNullCache

func NewNullCache() CacheInterface

func NewRedisCache

func NewRedisCache(host, port, password string) CacheInterface

type FileCache

type FileCache struct {
}

func (*FileCache) Cache

func (self *FileCache) Cache(key string, body string)

func (*FileCache) Close

func (self *FileCache) Close()

func (*FileCache) DeleteCache

func (self *FileCache) DeleteCache(key string)

func (*FileCache) ServeCached

func (self *FileCache) ServeCached(w http.ResponseWriter, r *http.Request, key string, handler RecacheHandler)

type NullCache

type NullCache struct {
}

func (*NullCache) Cache

func (self *NullCache) Cache(key string, body string)

func (*NullCache) Close

func (self *NullCache) Close()

func (*NullCache) DeleteCache

func (self *NullCache) DeleteCache(key string)

func (*NullCache) ServeCached

func (self *NullCache) ServeCached(w http.ResponseWriter, r *http.Request, key string, handler RecacheHandler)

type RecacheHandler

type RecacheHandler func() string

type RedisCache

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

func (*RedisCache) Cache

func (self *RedisCache) Cache(key string, body string)

func (*RedisCache) Close

func (self *RedisCache) Close()

func (*RedisCache) DeleteCache

func (self *RedisCache) DeleteCache(key string)

func (*RedisCache) ServeCached

func (self *RedisCache) ServeCached(w http.ResponseWriter, r *http.Request, key string, handler RecacheHandler)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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