FEAT [Generation]: Introduce a centralized API to switch between cache implementations
#29030
+154
−3