# jhalterman/expiringmap

A high performance thread-safe map that expires entries

Repository: https://github.com/jhalterman/expiringmap
Canonical: https://ross.abutalabs.com/products/expiringmap
Language: Java
License: Apache-2.0
License Family: permissive
Last push: 2025-01-25T04:31:29+00:00

## Health v2 (maintenance only)
Score: 34/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 3, release rhythm 35, longevity 100
- inputs: {"age_days": 5794, "days_push": 585, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1036, forks 148 (observed 2026-08-28T04:03:19.282962+00:00)

## What it is
ExpiringMap is a high-performance, zero-dependency, thread-safe Java ConcurrentMap implementation whose entries expire automatically. It supports variable per-entry expiration, expiration policies, max-size eviction, expiration listeners, and lazy loading.

## Use cases
- cache session data with automatic expiry in java
- store connections in a map that expire after 30 seconds
- evict oldest entries when map reaches max size
- run a callback when a cached entry expires
- give each map entry its own ttl
- replace guava cache with a lightweight expiring map

## When to choose
- you need a simple, zero-dependency expiring map on the JVM
- you need per-entry variable TTLs or expiration policies
- you want expiration listeners or lazy entry loading without a full caching framework

## When to avoid
- you need advanced caching features like LRU eviction, statistics, or persistence - use Caffeine or Guava Cache
- you need a distributed or multi-process cache
- you are not on the JVM

## Facets
- artifact type: library
- maturity: stable
- function: caching, concurrency, data-science
- domain: developer-tools, backend, performance
- platform: jvm
- tags: expiring-map, concurrentmap, ttl, cache, zero-dependency, thread-safe

## Member repositories
- jhalterman/expiringmap (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:19.282962+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:04:40.991903+00:00, confidence not recorded.
  - readme: https://github.com/jhalterman/expiringmap (fetched 2026-08-28T04:03:19.282962+00:00, sha 1483a630f88d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
