Capacity and weight must be nonnegative safe integers; zero disables retention.
Optional
Maximum retained entries; defaults to 1024. Zero disables retention.
Maximum total weight in caller-defined units. Zero disables retention.
Return a nonnegative safe integer. Called once per attempted insertion.
Capacity and weight must be nonnegative safe integers; zero disables retention.