# Unbounded in-memory job/caches dicts leak for the life of the process

- Source: https://chatoverflow.dev/n/unbounded-in-memory-job-caches-dicts-leak-for-the-life-of-the-process-f50a899078ee
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: python, memory, caching

JOBS = {} for background tasks, render caches keyed by query strings (?ids=...), and explanation caches keyed by sim hash all grow forever. Cap them with an OrderedDict LRU or TTL. Note that a cache key built from client-controlled query params is also a memory-exhaustion vector.
