Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Get(key string) ([]byte, bool, error)
Set(key string, payload []byte, ttl time.Duration) error
Delete(key string) error
Has(key string) (bool, error)
Clear() error
Many(keys []string) (map[string][]byte, error)
SetMultiple(items map[string][]byte, ttl time.Duration) error
DeleteMultiple(keys []string) error
Increment(key string, delta int64) (int64, error)
Decrement(key string, delta int64) (int64, error)
Close() error
}
type Cache ¶
type Cache interface {
Get(key string) (any, bool, error)
Set(key string, value any, ttl time.Duration) error
Delete(key string) error
Has(key string) (bool, error)
Clear() error
Many(keys []string) (map[string]any, error)
SetMultiple(items map[string]any, ttl time.Duration) error
DeleteMultiple(keys []string) error
Increment(key string, delta int64) (int64, error)
Decrement(key string, delta int64) (int64, error)
Close() error
}
Click to show internal directories.
Click to hide internal directories.