There is intelligence in the partial caching for rails that watches for the partial contents to change, presumably with a hash. That is also seemingly smart enough to watch the hashes of partials rendered within the current partial too.
I can’t find the code for that in the Rails repo for the life of me. Does anyone know where that code lives?
That is ActiveRecord, not the ActionView partials part.
The core issue is sort of what your comment raises - there is a lot of caching code, and most is unrelated to partials, and it is hard to hunt down that portion.