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) DeleteCache ¶
func (*FileCache) ServeCached ¶
func (self *FileCache) ServeCached(w http.ResponseWriter, r *http.Request, key string, handler RecacheHandler)
type NullCache ¶
type NullCache struct { }
func (*NullCache) DeleteCache ¶
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)
Click to show internal directories.
Click to hide internal directories.