Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache provides a high-performance in-memory cache
type Config ¶
type Config struct {
// MaxCost is the maximum cost of cache entries (in bytes approximately)
MaxCost int64
// NumCounters is the number of keys to track frequency
NumCounters int64
// BufferItems is the size of the internal buffer
BufferItems int64
}
Config holds cache configuration
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns sensible defaults for the cache
Click to show internal directories.
Click to hide internal directories.