Versions in this module Expand all Collapse all v0 v0.9.1 Mar 2, 2014 v0.9.0 Feb 26, 2014 Changes in this version + const DEFAULT + const FOREVER + var ErrCacheMiss = errors.New("revel/cache: key not found.") + var ErrNotStored = errors.New("revel/cache: not stored.") + var Instance Cache + func Add(key string, value interface{}, expires time.Duration) error + func Decrement(key string, n uint64) (newValue uint64, err error) + func Delete(key string) error + func Deserialize(byt []byte, ptr interface{}) (err error) + func Flush() error + func Get(key string, ptrValue interface{}) error + func Increment(key string, n uint64) (newValue uint64, err error) + func Replace(key string, value interface{}, expires time.Duration) error + func Serialize(value interface{}) ([]byte, error) + func Set(key string, value interface{}, expires time.Duration) error + type Cache interface + Add func(key string, value interface{}, expires time.Duration) error + Decrement func(key string, n uint64) (newValue uint64, err error) + Delete func(key string) error + Flush func() error + GetMulti func(keys ...string) (Getter, error) + Increment func(key string, n uint64) (newValue uint64, err error) + Replace func(key string, value interface{}, expires time.Duration) error + Set func(key string, value interface{}, expires time.Duration) error + type Getter interface + Get func(key string, ptrValue interface{}) error + func GetMulti(keys ...string) (Getter, error) + type InMemoryCache struct + func NewInMemoryCache(defaultExpiration time.Duration) InMemoryCache + func (c InMemoryCache) Add(key string, value interface{}, expires time.Duration) error + func (c InMemoryCache) Decrement(key string, n uint64) (newValue uint64, err error) + func (c InMemoryCache) Delete(key string) error + func (c InMemoryCache) Flush() error + func (c InMemoryCache) Get(key string, ptrValue interface{}) error + func (c InMemoryCache) GetMulti(keys ...string) (Getter, error) + func (c InMemoryCache) Increment(key string, n uint64) (newValue uint64, err error) + func (c InMemoryCache) Replace(key string, value interface{}, expires time.Duration) error + func (c InMemoryCache) Set(key string, value interface{}, expires time.Duration) error + type ItemMapGetter map[string]*memcache.Item + func (g ItemMapGetter) Get(key string, ptrValue interface{}) error + type MemcachedCache struct + func NewMemcachedCache(hostList []string, defaultExpiration time.Duration) MemcachedCache + func (c MemcachedCache) Add(key string, value interface{}, expires time.Duration) error + func (c MemcachedCache) Decrement(key string, delta uint64) (newValue uint64, err error) + func (c MemcachedCache) Delete(key string) error + func (c MemcachedCache) Flush() error + func (c MemcachedCache) Get(key string, ptrValue interface{}) error + func (c MemcachedCache) GetMulti(keys ...string) (Getter, error) + func (c MemcachedCache) Increment(key string, delta uint64) (newValue uint64, err error) + func (c MemcachedCache) Replace(key string, value interface{}, expires time.Duration) error + func (c MemcachedCache) Set(key string, value interface{}, expires time.Duration) error + type RedisCache struct + func NewRedisCache(host string, password string, defaultExpiration time.Duration) RedisCache + func (c RedisCache) Add(key string, value interface{}, expires time.Duration) error + func (c RedisCache) Decrement(key string, delta uint64) (newValue uint64, err error) + func (c RedisCache) Delete(key string) error + func (c RedisCache) Flush() error + func (c RedisCache) Get(key string, ptrValue interface{}) error + func (c RedisCache) GetMulti(keys ...string) (Getter, error) + func (c RedisCache) Increment(key string, delta uint64) (uint64, error) + func (c RedisCache) Replace(key string, value interface{}, expires time.Duration) error + func (c RedisCache) Set(key string, value interface{}, expires time.Duration) error + type RedisItemMapGetter map[string][]byte + func (g RedisItemMapGetter) Get(key string, ptrValue interface{}) error