Documentation ¶
Index ¶
- Constants
- func IsNoCache(ctx context.Context) bool
- func Memoize[REQ any, REPLY any, T func(context.Context, REQ) (REPLY, error)](d *MemoizeData, fn T, ctx context.Context, req REQ, ...) (_ret REPLY, _err error)
- func SetNoCache(ctx context.Context, b bool) context.Context
- type CtxKey
- type MemoizeData
Constants ¶
View Source
const (
CtxKeyNoCache = CtxKey("no_cache")
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MemoizeData ¶
type MemoizeData struct { Cache map[objhash.ObjHash]any CacheMetaLock sync.Mutex CacheLockMap *lockmap.LockMap }
func NewMemoizeData ¶
func NewMemoizeData() *MemoizeData
func (*MemoizeData) InvalidateCache ¶
func (d *MemoizeData) InvalidateCache(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.