Documentation
¶
Overview ¶
Package null supplies a cache backend that retains nothing, for disabling a cache store without changing its typed declarations. Every read misses and every write succeeds without storing, so Remember always runs its loader.
Index ¶
- type Backend
- func (Backend) Add(ctx context.Context, key cache.EntryKey, _ []byte, ttl cache.TTL) (bool, error)
- func (b Backend) AddTagged(ctx context.Context, key cache.TaggedKey, data []byte, ttl cache.TTL) (bool, error)
- func (Backend) Exists(ctx context.Context, key cache.EntryKey) (bool, error)
- func (Backend) ExistsTagged(ctx context.Context, key cache.TaggedKey) (bool, error)
- func (Backend) Expire(ctx context.Context, key cache.EntryKey, ttl cache.TTL) (bool, error)
- func (Backend) ExpireTagged(ctx context.Context, key cache.TaggedKey, ttl cache.TTL) (bool, error)
- func (Backend) Forget(ctx context.Context, key cache.EntryKey) (bool, error)
- func (Backend) ForgetMany(ctx context.Context, keys []cache.EntryKey) (uint64, error)
- func (Backend) ForgetManyTagged(ctx context.Context, keys []cache.TaggedKey) (uint64, error)
- func (Backend) ForgetTagged(ctx context.Context, key cache.TaggedKey) (bool, error)
- func (Backend) FoundryAdapter(frameworkadapter.Seal)
- func (Backend) Get(ctx context.Context, key cache.EntryKey) ([]byte, bool, error)
- func (Backend) GetMany(ctx context.Context, keys []cache.EntryKey) ([]cache.BatchValue, error)
- func (Backend) GetManyTagged(ctx context.Context, keys []cache.TaggedKey) ([]cache.BatchValue, error)
- func (Backend) GetTagged(ctx context.Context, key cache.TaggedKey) ([]byte, bool, error)
- func (Backend) Increment(ctx context.Context, key cache.EntryKey, delta int64, ttl cache.TTL) (int64, error)
- func (Backend) IncrementTagged(ctx context.Context, key cache.TaggedKey, delta int64, ttl cache.TTL) (int64, error)
- func (Backend) InvalidateTags(ctx context.Context, keys []cache.EntryKey) error
- func (Backend) Put(ctx context.Context, key cache.EntryKey, _ []byte, ttl cache.TTL) error
- func (Backend) PutTagged(ctx context.Context, key cache.TaggedKey, _ []byte, ttl cache.TTL) error
- func (Backend) ResolveTags(ctx context.Context, keys []cache.EntryKey) ([]cache.TagVersion, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct{}
Backend implements every typed cache capability without storage, so stores requiring tags, counters, entries or batches accept it. Inputs are validated like any adapter's. Add reports true (the entry was absent) and Increment returns delta (a counter starting at zero), although nothing is retained; neither can serve as a lock or an accumulator. Tag resolution returns fresh versions each call. Construction performs no I/O and there is nothing to close.
func (Backend) ExistsTagged ¶
func (Backend) ExpireTagged ¶
func (Backend) ForgetMany ¶
func (Backend) ForgetManyTagged ¶
func (Backend) ForgetTagged ¶
func (Backend) FoundryAdapter ¶
func (Backend) FoundryAdapter(frameworkadapter.Seal)
FoundryAdapter marks the backend as framework-owned adapter I/O.
func (Backend) GetManyTagged ¶
func (Backend) IncrementTagged ¶
func (Backend) InvalidateTags ¶
func (Backend) ResolveTags ¶
ResolveTags returns fresh versions: nothing tagged is ever stored.