Documentation ¶
Index ¶
- Variables
- func GobDecode(data []byte, to *Item) error
- func GobEncode(data interface{}) ([]byte, error)
- func NewFileCache() cache.Cache
- func PutContents(filename string, content []byte) error
- type Cache
- func (c *Cache) Create() error
- func (c *Cache) Delete(ctx context.Context, key string) error
- func (c *Cache) Get(ctx context.Context, key string) (interface{}, error)
- func (c *Cache) GetClient() interface{}
- func (c *Cache) GetMulti(ctx context.Context, keys []string) ([]interface{}, error)
- func (c *Cache) Put(ctx context.Context, key string, val interface{}, timeout time.Duration) error
- func (c *Cache) Start(config string) error
- type Item
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CachePath = "cache" // cache directory CacheFileSuffix = ".bin" // cache file suffix CacheDirectoryLevel = 2 // cache file deep level if auto generated cache files. CacheEmbedExpiry time.Duration // cache expire time, default is no expire forever. )
Functions ¶
func NewFileCache ¶
func PutContents ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.