Documentation
¶
Index ¶
- type NSCache
- func (n *NSCache[S]) Close() error
- func (n *NSCache[S]) Del(ctx context.Context, key string) error
- func (n *NSCache[S]) DelAll(ctx context.Context) error
- func (n *NSCache[S]) Exists(ctx context.Context, key string) (bool, error)
- func (n *NSCache[S]) Get(ctx context.Context, key string) (S, bool, error)
- func (n *NSCache[S]) GetDel(ctx context.Context, key string) (S, bool, error)
- func (n *NSCache[S]) MultiDel(ctx context.Context, keys []string) error
- func (n *NSCache[S]) MultiGet(ctx context.Context, keys []string) (map[string]S, error)
- func (n *NSCache[S]) MultiSet(ctx context.Context, valMap map[string]S) error
- func (n *NSCache[S]) MultiSetWithTTL(ctx context.Context, valMap map[string]S, expiration time.Duration) error
- func (n *NSCache[S]) Set(ctx context.Context, key string, val S) error
- func (n *NSCache[S]) SetWithTTL(ctx context.Context, key string, val S, expiration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NSCache ¶
type NSCache[S any] struct { // contains filtered or unexported fields }
NSCache is a namespaced cache wrapper.
func NewNSCache ¶
NewNSCache creates a new namespaced cache.
func (*NSCache[S]) MultiSetWithTTL ¶
Click to show internal directories.
Click to hide internal directories.