Discover Packages
github.com/wjayesh/coredns
plugin
pkg
cache
package
Version:
v1.1.2
Opens a new window with list of versions in this module.
Published: Apr 23, 2018
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package cache implements a cache. The cache hold 256 shards, each shard
holds a cache: a map with a mutex. There is no fancy expunge algorithm, it
just randomly evicts elements when it gets full.
Hash returns the FNV hash of what.
Cache is cache.
Add adds a new element to the cache. If the element already exists it is overwritten.
Get looks up element index under key.
Len returns the number of elements in the cache.
Remove removes the element indexed with key.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.