Documentation ¶
Index ¶
- Constants
- func NewCache[T any]() *cache.Cache[T]
- func NewSQLLiteStore[T any]() store.StoreInterface
- type DiskStore
- func (store DiskStore[T]) Clear(ctx context.Context) error
- func (store DiskStore[T]) Delete(ctx context.Context, key any) error
- func (store DiskStore[T]) Get(ctx context.Context, key any) (any, error)
- func (store DiskStore[T]) GetType() string
- func (store DiskStore[T]) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)
- func (store DiskStore[T]) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error
- func (store DiskStore[T]) Set(ctx context.Context, key any, value any, options ...lib_store.Option) error
- type SQLLiteStore
- func (store SQLLiteStore[T]) Clear(ctx context.Context) error
- func (store SQLLiteStore[T]) Delete(ctx context.Context, key any) error
- func (store SQLLiteStore[T]) Get(ctx context.Context, key any) (any, error)
- func (store SQLLiteStore[T]) GetType() string
- func (store SQLLiteStore[T]) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)
- func (store SQLLiteStore[T]) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error
- func (store SQLLiteStore[T]) Set(ctx context.Context, key any, value any, options ...lib_store.Option) error
Constants ¶
View Source
const (
DiskCacheType = "disk-cache"
)
View Source
const (
SQLLiteStoreType = "sqllite-cache"
)
Variables ¶
This section is empty.
Functions ¶
func NewSQLLiteStore ¶
func NewSQLLiteStore[T any]() store.StoreInterface
Types ¶
type DiskStore ¶
type DiskStore[T any] struct { // contains filtered or unexported fields }
func (DiskStore[T]) GetWithTTL ¶
func (DiskStore[T]) Invalidate ¶
type SQLLiteStore ¶
type SQLLiteStore[T any] struct { // contains filtered or unexported fields }
func (SQLLiteStore[T]) Delete ¶
func (store SQLLiteStore[T]) Delete(ctx context.Context, key any) error
func (SQLLiteStore[T]) GetType ¶
func (store SQLLiteStore[T]) GetType() string
func (SQLLiteStore[T]) GetWithTTL ¶
func (SQLLiteStore[T]) Invalidate ¶
func (store SQLLiteStore[T]) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error
Click to show internal directories.
Click to hide internal directories.