JavaScript
WeakRef Object Cache
A cache backed by WeakRef and FinalizationRegistry. Stored values are held weakly — the garbage collector can reclaim them if memory pressure is high, and the registry automatically cleans up stale entries from the internal map. Ideal for caching large objects (DOM nodes, rendered images) without causing memory leaks.