Versions in this module Expand all Collapse all v4 v4.0.0 Apr 20, 2020 Changes in this version + var FileExtension = ".dat" + type Cache struct + func NewCache(cachefuncs ...CacheFunc) *Cache + func (c *Cache) NewRequest(ctx context.Context, job Job) *Request + func (c *Cache) NewRequestRecursive(ctx context.Context, job JobRecursive) *Request + func (c *Cache) Requests() []int + type CacheFunc func(in chan *Request) (out chan *Request) + func Deduplicate() CacheFunc + func Disk(dir string) CacheFunc + func GoogleCloudStorage(ctx context.Context, bucket, subdir string) (CacheFunc, error) + func HTTP(addr string) CacheFunc + func Memory(maxEntries int) CacheFunc + func SQL(ctx context.Context, db *sql.DB) (CacheFunc, error) + type Job interface + Key func() string + Run func(context.Context, Result) error + type JobRecursive interface + Key func() string + Run func(context.Context, *Cache, Result) error + type Request struct + func (r *Request) Result(result Result) error + type Result interface Other modules containing this package github.com/ctessum/requestcache github.com/ctessum/requestcache/v2 github.com/ctessum/requestcache/v3