The Computing Series

Thread Activation

In Book 1, Ch 21, memoization transformed the Fibonacci function from O(2ⁿ) to O(N) by storing results in a dictionary. The pattern: check if memo[key] exists; if yes, return it; if no, compute, store, return.

This chapter is the explicit bridge for Thread 5 (Caching/Memoization): DP memoization (Book 1, Ch 21) → infrastructure caching (this chapter) → CDN and cache layer (Book 3, Ch 6–7). The mathematical structure is identical. The engineering problem added by infrastructure caching is cache invalidation — the memo table assumes the underlying function is pure (same input → always same output). Infrastructure caches must handle the case where the underlying data changes.


Read in the book →