module

Fetcher::BoundedRegistry

Class methods

cleanup(entries : Hash(String, T)) : Nil forall T
Source
ensure_limit(entries : Hash(String, T), max_entries : Int32, default_ttl : Time::Span) : Nil forall T
Source
mark_access(entries : Hash(String, T), key : String) : Bool forall T

Mark an entry as accessed by updating its last_accessed time. Returns true if the entry exists and was updated, false otherwise. Note: Works with entries that have mutable last_accessed property.

Source