Documentation
¶
Overview ¶
Package memcache implements a simple in-memory cache.
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 represents an in-memory cache.
func New ¶
func New() *Cache
New creates a new cache with default timeout and returns it.
Users can close the cache to free allocated resources when the cache is no longer needed.
func NewWithTimeout ¶
NewWithTimeout creates a new cache with a specific timeout for the regular clean-up and returns it.
A timeout of 0 disables the automatic clean-up and users then need to start clean-up manually.
When automatic clean-up is enabled users can close the cache to free allocated resources when the cache is no longer needed.
Click to show internal directories.
Click to hide internal directories.