Skip to content

v1.3.0

Latest

Choose a tag to compare

@kasapdev kasapdev released this 20 Sep 08:01
69b8bea

Added

  • V remove(K key) - removes an entry and returns its live value (or null
    if absent/expired). Not counted as a hit or miss.
  • V computeIfAbsent(K key, Function<? super K, ? extends V> loader) and an
    overload taking an explicit long ttlMillis - returns the cached value or
    computes, stores and returns it. Runs under the cache lock, so concurrent
    callers for the same key run the loader once. Counts as one hit or miss. A
    null result or an exception stores nothing.
  • List<K> keys() - snapshot of live keys, least- to most-recently-used, with
    no effect on recency or statistics.