Documentation
¶
Index ¶
- type Helper
- type Option
- type ProtoCache
- func (c *ProtoCache[T]) Clear(ctx context.Context) error
- func (c *ProtoCache[T]) Delete(ctx context.Context, key any) error
- func (c *ProtoCache[T]) Get(ctx context.Context, key any) (T, error)
- func (c *ProtoCache[T]) GetType() string
- func (c *ProtoCache[T]) Invalidate(ctx context.Context, options ...store.InvalidateOption) error
- func (c *ProtoCache[T]) Set(ctx context.Context, key any, object T, options ...store.Option) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper[T any] struct { cache.CacheInterface[T] // contains filtered or unexported fields }
type Option ¶
type Option func(*option)
func WithGroup ¶
func WithGroup(g ...*singleflight.Group) Option
WithGroup pass nil to disable singleflight.Group
func WithStoreOption ¶
type ProtoCache ¶
func NewProtoCache ¶
func NewProtoCache[T proto.Message](creator func() T, proxy cache.CacheInterface[string]) *ProtoCache[T]
func (*ProtoCache[T]) GetType ¶
func (c *ProtoCache[T]) GetType() string
func (*ProtoCache[T]) Invalidate ¶
func (c *ProtoCache[T]) Invalidate(ctx context.Context, options ...store.InvalidateOption) error
Click to show internal directories.
Click to hide internal directories.