Tagged articles

Three Cache

2 articles · Page 1 of 1
Code Ape Tech Column
Code Ape Tech Column
Jan 7, 2021 · Backend Development

How Spring Solves Circular Dependencies: Inside the Three‑Cache Mechanism

This article explains how Spring resolves circular dependencies for singleton beans using a three‑level cache, contrasts it with prototype limitations, provides a minimal container implementation that mimics the mechanism, and draws an analogy to the classic two‑sum algorithm to illustrate the core caching principle.

Dependency InjectionJavaSpring
0 likes · 11 min read
How Spring Solves Circular Dependencies: Inside the Three‑Cache Mechanism
Java Backend Technology
Java Backend Technology
May 3, 2020 · Backend Development

How Spring Solves Circular Dependencies: The 3‑Cache Trick Explained

This article explains how Spring resolves circular dependencies in singleton beans using a three‑level cache, why prototype beans cannot participate, provides a minimal example implementation, and draws an analogy to the classic two‑sum algorithm to illustrate the underlying principle.

Dependency InjectionJavaSpring
0 likes · 10 min read
How Spring Solves Circular Dependencies: The 3‑Cache Trick Explained