<!-- llms-explorer concept facts · https://llms-explorer.com/tree/atlas-stream-processing-cached-lookup-ttl-and-eviction/ · pack 2026-10-29 · ~645 tokens -->

# Atlas Stream Processing cached lookup TTL and eviction

> Source-anchored research for Atlas Stream Processing cached lookup TTL and eviction. Run status: COMPLETED.

Parent: [MongoDB Atlas Stream Processing](https://llms-explorer.com/tree/mongodb-atlas-stream-processing/) · 4 facets · 8 facts · page: https://llms-explorer.com/tree/atlas-stream-processing-cached-lookup-ttl-and-eviction/

## Structure and components

- The required ttl document contains integer size and unit: ms, second, minute, hour, or day. Entries are evicted when TTL elapses. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/atlas-stream-processing/sp-agg-cachedlookup.md)

## How it works

- MongoDB recommends caching static or slowly changing reference data; its tier guide recommends higher tiers when large reference sets need more cache RAM. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/atlas-stream-processing/sp-agg-cachedlookup.md)
- Inference: TTL is not a guaranteed residence time, because memory-pressure eviction can remove cached results earlier. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/atlas-stream-processing/sp-agg-cachedlookup.md)

## Problems, failure modes and limitations

- At the memory limit, eviction frees space for new results. The syntax table describes older/expired results first, then random eviction if insufficient. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/atlas-stream-processing/sp-agg-cachedlookup.md)
- maxMemUsageBytes defaults to 10% of workspace RAM and cannot exceed 12.5%, according to the syntax table. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/atlas-stream-processing/sp-agg-cachedlookup.md)

## Facts and statements

- $cachedLookup joins stream messages to an Atlas collection registered in the Connection Registry and caches query results. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/atlas-stream-processing/sp-agg-cachedlookup.md)
- $cachedLookup does not support let or pipeline fields. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/atlas-stream-processing/sp-agg-cachedlookup.md)
- The 19 August 2025 release added $cachedLookup; the 27 August release added lifetime cache hit/miss statistics under stats.operatorStats. (low confidence) — [source](https://www.mongodb.com/docs/atlas/atlas-stream-processing/changelog.md)
