Discover Packages
github.com/faroyam/caches
lru
package
Version:
v0.0.0-...-d6e4ce5
Opens a new window with list of versions in this module.
Published: Apr 11, 2021
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Cache represents safe for concurrent use Least Recently Used cache
New returns an initialized cache instance
Clear removes all saved records
Delete removes the record associated with the specified key from the cache
Get returns (value, true) or (nil, false) for a given key
LRU returns (key, true) that was not touched for the longest time.
Returns ("", false) if there are no keys in the cache.
Does not "use" record i.e. returning record will remain untouched.
Len returns the number of records in the cache
Put inserts a new record into the cache
Source Files
¶
Click to show internal directories.
Click to hide internal directories.