GO-2025-3583 : Nethermind Juno Potential Denial of Service (DoS) via Integer Overflow in github.com/NethermindEth/juno
Discover Packages
github.com/NethermindEth/juno
internal
cache
lru
package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Sep 6, 2022
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
¶
Cache is a cache with the least-recently-used policy.
NewCache creates a new Cache instance with the given cap. If cap == 0, nil is
returned.
Back returns a copy of value at the back of the cache
Cap returns the max amount of items that can be stored in the cache.
Clear removes all items from the cache.
Front returns a copy of the value at front of the cache
Get returns the value for the given key. If the key is not found then
returns nil.
Len returns the current amount of items in the cache.
Put adds a new key-value pair to the cache. If the cache is full then
the least-recently-used key-value pair is removed. If the key already exist
in the cache then the node will be replaced and put at the front of the
cache.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.