Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheProvider ¶
type CacheProvider interface {
Set(ctx context.Context, key string, value any, ttl time.Duration) (setable bool)
Get(ctx context.Context, key string, unmarshalTo any) (found bool)
Del(ctx context.Context, key string) (deleted bool)
Keys(ctx context.Context, pattern string) []string
Unlink(ctx context.Context, keys ...string) bool
Incr(ctx context.Context, key string) bool
Decr(ctx context.Context, key string) bool
Flush() error
}
func New ¶
func New(store StoreAdapter) CacheProvider
type NetworkSerializable ¶
type StoreAdapter ¶
type StoreAdapter interface {
CacheAdapter()
Set(ctx context.Context, key string, value string, ttl time.Duration) (setable bool)
Get(ctx context.Context, key string) (val string, found bool)
Del(ctx context.Context, key string) (deleted bool)
Keys(ctx context.Context, pattern string) []string
Unlink(ctx context.Context, keys ...string) bool
Incr(ctx context.Context, key string) bool
Decr(ctx context.Context, key string) bool
Flush() error
}
Click to show internal directories.
Click to hide internal directories.