derivatives), together with the grid weights and the per-slice significant-AO pruning metadata, depends ONLY on geometry + basis + grid + integration thresholds -- NOT on the electron density. It is therefore identical on every SCF iteration, yet the native grid loop recomputes it (compAOs / pruneAOs) on every Fock build. This module stores the post-pruning Phi block per grid slice once per geometry and replays it on subsequent iterations, mirroring the incremental reuse OpenQP already does for the J/K (HF) part of the Fock matrix.
The cache is OPT-IN (env var OQP_XC_PHI_CACHE) and is only populated by the repeated SCF energy/Fock build (mod_dft_gridint_energy::dmatd_blk); one-shot consumers (gradients, response) never set the opt-in flag. Validity is keyed by a geometry hash + derivative order + DFT threshold, so any change transparently rebuilds the cache. The replayed Phi is bit-for-bit identical to the recomputed Phi, so the converged energy/gradient are unchanged.