Versions in this module Expand all Collapse all v0 v0.1.7 Dec 5, 2021 Changes in this version + const Fetch + const Hit + const Miss + var BarCacheStore = &BarCache + var FixCacheStore = &FixCache + var FooCacheStore = &FooCache + var FooListCacheStore = &FooListCache + var FooListPCacheStore = &FooListPCache + var FooMapCacheStore = &FooMapCache + var FooMapSCacheStore = &FooMapSCache + var FooPCacheStore = &FooPCache + var SimpleCacheStore = &SimpleCache + var SimpleFlightCacheStore = &SimpleFlightCache + var SimpleMultiCacheStore = &SimpleMultiCache + type BarCache struct + Fetch func(ctx context.Context, ID string) (model.Bar, error) + func (s *BarCache) Get(ctx context.Context, ID string) (model.Bar, error) + func (s *BarCache) GetM(ID string) *BarMultiGetter + func (s *BarCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*BarPromise, error) + func (s *BarCache) Invalid(ctx context.Context, ID string) error + func (s *BarCache) InvalidAll(ctx context.Context, version string) error + func (s *BarCache) MGetter() *BarMultiGetter + func (s *BarCache) Update(ctx context.Context, ID string) error + type BarMultiGetter struct + func (g *BarMultiGetter) Do(ctx context.Context) (*BarQuerySet, error) + func (g *BarMultiGetter) GetM(ID string) *BarMultiGetter + type BarPromise struct + func (p *BarPromise) Result() (model.Bar, error) + type BarQuerySet struct + func (q *BarQuerySet) Get(ID string) (model.Bar, error) + func (q *BarQuerySet) GetSlice() []model.Bar + type Client struct + BarCacheStore *BarCache + FixCacheStore *FixCache + FooCacheStore *FooCache + FooListCacheStore *FooListCache + FooListPCacheStore *FooListPCache + FooMapCacheStore *FooMapCache + FooMapSCacheStore *FooMapSCache + FooPCacheStore *FooPCache + SimpleCacheStore *SimpleCache + SimpleFlightCacheStore *SimpleFlightCache + SimpleMultiCacheStore *SimpleMultiCache + func New(redis cacheme.RedisClient) *Client + func NewCluster(redis cacheme.RedisClient) *Client + func (c *Client) NewPipeline() *cacheme.CachePipeline + func (c *Client) Redis() cacheme.RedisClient + func (c *Client) SetLogger(l cacheme.Logger) + type FixCache struct + Fetch func(ctx context.Context) (string, error) + func (s *FixCache) Get(ctx context.Context) (string, error) + func (s *FixCache) GetM() *FixMultiGetter + func (s *FixCache) GetP(ctx context.Context, pp *cacheme.CachePipeline) (*FixPromise, error) + func (s *FixCache) Invalid(ctx context.Context) error + func (s *FixCache) InvalidAll(ctx context.Context, version string) error + func (s *FixCache) MGetter() *FixMultiGetter + func (s *FixCache) Update(ctx context.Context) error + type FixMultiGetter struct + func (g *FixMultiGetter) Do(ctx context.Context) (*FixQuerySet, error) + func (g *FixMultiGetter) GetM() *FixMultiGetter + type FixPromise struct + func (p *FixPromise) Result() (string, error) + type FixQuerySet struct + func (q *FixQuerySet) Get() (string, error) + func (q *FixQuerySet) GetSlice() []string + type FooCache struct + Fetch func(ctx context.Context, ID string) (model.Foo, error) + func (s *FooCache) Get(ctx context.Context, ID string) (model.Foo, error) + func (s *FooCache) GetM(ID string) *FooMultiGetter + func (s *FooCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*FooPromise, error) + func (s *FooCache) Invalid(ctx context.Context, ID string) error + func (s *FooCache) InvalidAll(ctx context.Context, version string) error + func (s *FooCache) MGetter() *FooMultiGetter + func (s *FooCache) Update(ctx context.Context, ID string) error + type FooListCache struct + Fetch func(ctx context.Context, ID string) ([]model.Foo, error) + func (s *FooListCache) Get(ctx context.Context, ID string) ([]model.Foo, error) + func (s *FooListCache) GetM(ID string) *FooListMultiGetter + func (s *FooListCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*FooListPromise, error) + func (s *FooListCache) Invalid(ctx context.Context, ID string) error + func (s *FooListCache) InvalidAll(ctx context.Context, version string) error + func (s *FooListCache) MGetter() *FooListMultiGetter + func (s *FooListCache) Update(ctx context.Context, ID string) error + type FooListMultiGetter struct + func (g *FooListMultiGetter) Do(ctx context.Context) (*FooListQuerySet, error) + func (g *FooListMultiGetter) GetM(ID string) *FooListMultiGetter + type FooListPCache struct + Fetch func(ctx context.Context, ID string) ([]*model.Foo, error) + func (s *FooListPCache) Get(ctx context.Context, ID string) ([]*model.Foo, error) + func (s *FooListPCache) GetM(ID string) *FooListPMultiGetter + func (s *FooListPCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*FooListPPromise, error) + func (s *FooListPCache) Invalid(ctx context.Context, ID string) error + func (s *FooListPCache) InvalidAll(ctx context.Context, version string) error + func (s *FooListPCache) MGetter() *FooListPMultiGetter + func (s *FooListPCache) Update(ctx context.Context, ID string) error + type FooListPMultiGetter struct + func (g *FooListPMultiGetter) Do(ctx context.Context) (*FooListPQuerySet, error) + func (g *FooListPMultiGetter) GetM(ID string) *FooListPMultiGetter + type FooListPPromise struct + func (p *FooListPPromise) Result() ([]*model.Foo, error) + type FooListPQuerySet struct + func (q *FooListPQuerySet) Get(ID string) ([]*model.Foo, error) + func (q *FooListPQuerySet) GetSlice() [][]*model.Foo + type FooListPromise struct + func (p *FooListPromise) Result() ([]model.Foo, error) + type FooListQuerySet struct + func (q *FooListQuerySet) Get(ID string) ([]model.Foo, error) + func (q *FooListQuerySet) GetSlice() [][]model.Foo + type FooMapCache struct + Fetch func(ctx context.Context, ID string) (map[string]string, error) + func (s *FooMapCache) Get(ctx context.Context, ID string) (map[string]string, error) + func (s *FooMapCache) GetM(ID string) *FooMapMultiGetter + func (s *FooMapCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*FooMapPromise, error) + func (s *FooMapCache) Invalid(ctx context.Context, ID string) error + func (s *FooMapCache) InvalidAll(ctx context.Context, version string) error + func (s *FooMapCache) MGetter() *FooMapMultiGetter + func (s *FooMapCache) Update(ctx context.Context, ID string) error + type FooMapMultiGetter struct + func (g *FooMapMultiGetter) Do(ctx context.Context) (*FooMapQuerySet, error) + func (g *FooMapMultiGetter) GetM(ID string) *FooMapMultiGetter + type FooMapPromise struct + func (p *FooMapPromise) Result() (map[string]string, error) + type FooMapQuerySet struct + func (q *FooMapQuerySet) Get(ID string) (map[string]string, error) + func (q *FooMapQuerySet) GetSlice() []map[string]string + type FooMapSCache struct + Fetch func(ctx context.Context, ID string) (map[model.Foo]model.Bar, error) + func (s *FooMapSCache) Get(ctx context.Context, ID string) (map[model.Foo]model.Bar, error) + func (s *FooMapSCache) GetM(ID string) *FooMapSMultiGetter + func (s *FooMapSCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*FooMapSPromise, error) + func (s *FooMapSCache) Invalid(ctx context.Context, ID string) error + func (s *FooMapSCache) InvalidAll(ctx context.Context, version string) error + func (s *FooMapSCache) MGetter() *FooMapSMultiGetter + func (s *FooMapSCache) Update(ctx context.Context, ID string) error + type FooMapSMultiGetter struct + func (g *FooMapSMultiGetter) Do(ctx context.Context) (*FooMapSQuerySet, error) + func (g *FooMapSMultiGetter) GetM(ID string) *FooMapSMultiGetter + type FooMapSPromise struct + func (p *FooMapSPromise) Result() (map[model.Foo]model.Bar, error) + type FooMapSQuerySet struct + func (q *FooMapSQuerySet) Get(ID string) (map[model.Foo]model.Bar, error) + func (q *FooMapSQuerySet) GetSlice() []map[model.Foo]model.Bar + type FooMultiGetter struct + func (g *FooMultiGetter) Do(ctx context.Context) (*FooQuerySet, error) + func (g *FooMultiGetter) GetM(ID string) *FooMultiGetter + type FooPCache struct + Fetch func(ctx context.Context, ID string) (*model.Foo, error) + func (s *FooPCache) Get(ctx context.Context, ID string) (*model.Foo, error) + func (s *FooPCache) GetM(ID string) *FooPMultiGetter + func (s *FooPCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*FooPPromise, error) + func (s *FooPCache) Invalid(ctx context.Context, ID string) error + func (s *FooPCache) InvalidAll(ctx context.Context, version string) error + func (s *FooPCache) MGetter() *FooPMultiGetter + func (s *FooPCache) Update(ctx context.Context, ID string) error + type FooPMultiGetter struct + func (g *FooPMultiGetter) Do(ctx context.Context) (*FooPQuerySet, error) + func (g *FooPMultiGetter) GetM(ID string) *FooPMultiGetter + type FooPPromise struct + func (p *FooPPromise) Result() (*model.Foo, error) + type FooPQuerySet struct + func (q *FooPQuerySet) Get(ID string) (*model.Foo, error) + func (q *FooPQuerySet) GetSlice() []*model.Foo + type FooPromise struct + func (p *FooPromise) Result() (model.Foo, error) + type FooQuerySet struct + func (q *FooQuerySet) Get(ID string) (model.Foo, error) + func (q *FooQuerySet) GetSlice() []model.Foo + type SimpleCache struct + Fetch func(ctx context.Context, ID string) (string, error) + func (s *SimpleCache) Get(ctx context.Context, ID string) (string, error) + func (s *SimpleCache) GetM(ID string) *SimpleMultiGetter + func (s *SimpleCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*SimplePromise, error) + func (s *SimpleCache) Invalid(ctx context.Context, ID string) error + func (s *SimpleCache) InvalidAll(ctx context.Context, version string) error + func (s *SimpleCache) MGetter() *SimpleMultiGetter + func (s *SimpleCache) Update(ctx context.Context, ID string) error + type SimpleFlightCache struct + Fetch func(ctx context.Context, ID string) (string, error) + func (s *SimpleFlightCache) Get(ctx context.Context, ID string) (string, error) + func (s *SimpleFlightCache) GetM(ID string) *SimpleFlightMultiGetter + func (s *SimpleFlightCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, ID string) (*SimpleFlightPromise, error) + func (s *SimpleFlightCache) Invalid(ctx context.Context, ID string) error + func (s *SimpleFlightCache) InvalidAll(ctx context.Context, version string) error + func (s *SimpleFlightCache) MGetter() *SimpleFlightMultiGetter + func (s *SimpleFlightCache) Update(ctx context.Context, ID string) error + type SimpleFlightMultiGetter struct + func (g *SimpleFlightMultiGetter) Do(ctx context.Context) (*SimpleFlightQuerySet, error) + func (g *SimpleFlightMultiGetter) GetM(ID string) *SimpleFlightMultiGetter + type SimpleFlightPromise struct + func (p *SimpleFlightPromise) Result() (string, error) + type SimpleFlightQuerySet struct + func (q *SimpleFlightQuerySet) Get(ID string) (string, error) + func (q *SimpleFlightQuerySet) GetSlice() []string + type SimpleMultiCache struct + Fetch func(ctx context.Context, Foo string, Bar string, ID string) (string, error) + func (s *SimpleMultiCache) Get(ctx context.Context, Foo string, Bar string, ID string) (string, error) + func (s *SimpleMultiCache) GetM(Foo string, Bar string, ID string) *SimpleMultiMultiGetter + func (s *SimpleMultiCache) GetP(ctx context.Context, pp *cacheme.CachePipeline, Foo string, Bar string, ...) (*SimpleMultiPromise, error) + func (s *SimpleMultiCache) Invalid(ctx context.Context, Foo string, Bar string, ID string) error + func (s *SimpleMultiCache) InvalidAll(ctx context.Context, version string) error + func (s *SimpleMultiCache) MGetter() *SimpleMultiMultiGetter + func (s *SimpleMultiCache) Update(ctx context.Context, Foo string, Bar string, ID string) error + type SimpleMultiGetter struct + func (g *SimpleMultiGetter) Do(ctx context.Context) (*SimpleQuerySet, error) + func (g *SimpleMultiGetter) GetM(ID string) *SimpleMultiGetter + type SimpleMultiMultiGetter struct + func (g *SimpleMultiMultiGetter) Do(ctx context.Context) (*SimpleMultiQuerySet, error) + func (g *SimpleMultiMultiGetter) GetM(Foo string, Bar string, ID string) *SimpleMultiMultiGetter + type SimpleMultiPromise struct + func (p *SimpleMultiPromise) Result() (string, error) + type SimpleMultiQuerySet struct + func (q *SimpleMultiQuerySet) Get(Foo string, Bar string, ID string) (string, error) + func (q *SimpleMultiQuerySet) GetSlice() []string + type SimplePromise struct + func (p *SimplePromise) Result() (string, error) + type SimpleQuerySet struct + func (q *SimpleQuerySet) Get(ID string) (string, error) + func (q *SimpleQuerySet) GetSlice() []string