Documentation ¶
Overview ¶
Package cache offers concurrency safe in-memory cache based on b-tree and hash-map indexing. All methods of Cache struct are concurrency safe and operates cache atomically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// DefaultDegree is default b-tree degree.
DefaultDegree = 4
)
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache struct is concurrency safe in-memory cache based on b-tree and hash-map indexing. All methods of Cache struct are concurrency safe and operates cache atomically.
func NewCacheDegree ¶
NewCacheDegree returns a new Cache given degree.
func (*Cache) Close ¶
func (ce *Cache) Close()
Close closes the cache. It must be called if the cache will not use.
Click to show internal directories.
Click to hide internal directories.