Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCacheMiss = errors.New("cache miss")
)
All errors of the library.
Functions ¶
Types ¶
type Cache ¶
type Cache interface {
Get(key string) (interface{}, error)
GetMany(mapItems map[string]interface{}) error
Set(key string, value interface{}) error
SetWithTTL(key string, value interface{}, ttl time.Duration) error
SetMany(mapItems map[string]interface{}) error
SetManyWithTTL(mapItems map[string]interface{}, ttl time.Duration) error
Delete(key string) error
DeleteMany(key []string) error
Clear() error
}
Cache is a fast in-memory cache with the optimised storage for avoiding GC overhead. It is thread-safe and optimze for maximum hit ratio.
Click to show internal directories.
Click to hide internal directories.