package
Version:
v1.0.0-alpha.1
Opens a new window with list of versions in this module.
Published: Feb 24, 2022
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Hash(v interface{}) string
Hash computes the hash of the given object.
type Hashable interface {
Hash() string
}
Hashable represents an object that can compute a hash.
LRU is an LRU cache implementation.
NewLRU creates and returns a new LRU cache.
Get attempts to retrieve a cached value as a string. It returns false if the
value does not exist or cannot be type-casted to a string.
Set stores the given value to the cache.
type Options struct {
Capacity int
}
Options contains options for creating an LRU cache.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.