Versions in this module Expand all Collapse all v1 v1.0.1 Nov 13, 2019 v1.0.0 Aug 29, 2019 Changes in this version + var FileExtension = ".dat" + func MarshalGob(data interface{}) ([]byte, error) + func UnmarshalGob(b []byte) (interface{}, error) + type Cache struct + func NewCache(processor ProcessFunc, numProcessors int, cachefuncs ...CacheFunc) *Cache + func (c *Cache) NewRequest(ctx context.Context, requestPayload interface{}, key string) *Request + func (c *Cache) Requests() []int + type CacheFunc func(in chan *Request) (out chan *Request) + func Deduplicate() CacheFunc + func Disk(dir string, marshalFunc func(interface{}) ([]byte, error), ...) CacheFunc + func GoogleCloudStorage(ctx context.Context, bucket, subdir string, ...) (CacheFunc, error) + func HTTP(addr string, unmarshalFunc func([]byte) (interface{}, error)) CacheFunc + func Memory(maxEntries int) CacheFunc + func SQL(ctx context.Context, db *sql.DB, marshalFunc func(interface{}) ([]byte, error), ...) (CacheFunc, error) + type ProcessFunc func(ctx context.Context, requestPayload interface{}) (resultPayload interface{}, err error) + type Request struct + func (r *Request) Result() (interface{}, error) Other modules containing this package github.com/ctessum/requestcache/v2 github.com/ctessum/requestcache/v3 github.com/ctessum/requestcache/v4