Discover Packages
github.com/faroyam/caches
lfu
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 Frequently 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
LFU returns one of keys (key, frequency, true) that has been touched fewer times.
Returns ("", 0, 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 new record into the cache
Source Files
¶
Click to show internal directories.
Click to hide internal directories.