Versions in this module Expand all Collapse all v0 v0.1.0 Jun 10, 2019 Changes in this version + func GetString(c Cache, k string) (string, error) + func IsCacheMiss(e error) bool + func IsCacheMissMulti(e error) bool + func NewReadCloser(b []byte) io.ReadCloser + func NewReadCloserFromString(s string) io.ReadCloser + func SetString(c Cache, k string, v string) (string, error) + type Cache interface + Evictions func() int64 + Get func(string) (io.ReadCloser, error) + Hits func() int64 + Misses func() int64 + Name func() string + Set func(string, io.ReadCloser) (io.ReadCloser, error) + Size func() int64 + Unset func(string) error + func NewFSCache(root string) (Cache, error) + func NewGoCache(opts *GoCacheOptions) (Cache, error) + func NewMultiCache(caches []Cache) (Cache, error) + func NewNullCache() (Cache, error) + type CacheMiss struct + func (m CacheMiss) Error() string + type CacheMissMulti struct + func (m CacheMissMulti) Error() string + type FSCache struct + DirectoryPerms os.FileMode + FilePerms os.FileMode + TTL int64 + func (c *FSCache) Evictions() int64 + func (c *FSCache) Get(key string) (io.ReadCloser, error) + func (c *FSCache) Hits() int64 + func (c *FSCache) Misses() int64 + func (c *FSCache) Name() string + func (c *FSCache) Set(key string, fh io.ReadCloser) (io.ReadCloser, error) + func (c *FSCache) Size() int64 + func (c *FSCache) Unset(key string) error + type GoCache struct + Options *GoCacheOptions + func (c *GoCache) Evictions() int64 + func (c *GoCache) Get(key string) (io.ReadCloser, error) + func (c *GoCache) Hits() int64 + func (c *GoCache) Misses() int64 + func (c *GoCache) Name() string + func (c *GoCache) Set(key string, fh io.ReadCloser) (io.ReadCloser, error) + func (c *GoCache) Size() int64 + func (c *GoCache) Unset(key string) error + type GoCacheOptions struct + CleanupInterval time.Duration + DefaultExpiration time.Duration + func DefaultGoCacheOptions() (*GoCacheOptions, error) + func GoCacheOptionsFromArgs(args map[string]string) (*GoCacheOptions, error) + type MultiCache struct + func (mc *MultiCache) Evictions() int64 + func (mc *MultiCache) Get(key string) (io.ReadCloser, error) + func (mc *MultiCache) Hits() int64 + func (mc *MultiCache) Misses() int64 + func (mc *MultiCache) Name() string + func (mc *MultiCache) Set(key string, fh io.ReadCloser) (io.ReadCloser, error) + func (mc *MultiCache) Size() int64 + func (mc *MultiCache) Unset(key string) error + type NullCache struct + func (c *NullCache) Evictions() int64 + func (c *NullCache) Get(key string) (io.ReadCloser, error) + func (c *NullCache) Hits() int64 + func (c *NullCache) Misses() int64 + func (c *NullCache) Name() string + func (c *NullCache) Set(key string, fh io.ReadCloser) (io.ReadCloser, error) + func (c *NullCache) Size() int64 + func (c *NullCache) Unset(key string) error