Documentation ¶
Index ¶
- func AsyncSave() func(opt *Option)
- func SaveEmpty() func(opt *Option)
- func WithoutReplicate() func(opt *Option)
- type Cacheable
- type Codec
- type Context
- func (c *Context[R]) Del(key string) error
- func (c *Context[R]) Get(key string) ([]byte, error)
- func (c *Context[R]) GetContext() context.Context
- func (c *Context[R]) GetDriver() Driver
- func (c *Context[R]) GetName() string
- func (c *Context[R]) Set(key string, data []byte) error
- func (c *Context[R]) SetContext(ctx context.Context)
- type Driver
- type Manager
- func (m *Manager[T]) Del(ctx context.Context, key string) error
- func (m *Manager[T]) Get(ctx context.Context, key string) (ok bool, data T, err error)
- func (m *Manager[T]) GetOrSet(ctx context.Context, key string, cacheable Cacheable[T], opts ...OptionSet) (data T, err error)
- func (m *Manager[T]) Set(ctx context.Context, key string, data T, opts ...OptionSet) (err error)
- func (m *Manager[T]) Use(mid Plugin[T]) *Manager[T]
- type Metric
- type Option
- type OptionSet
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithoutReplicate ¶
func WithoutReplicate() func(opt *Option)
Types ¶
type Context ¶
type Context[R any] struct { // contains filtered or unexported fields }
func (*Context[R]) GetContext ¶
func (*Context[R]) SetContext ¶
type Manager ¶
type Manager[T any] struct { // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.