Proposal: Adding a persistent cache directory to PEP 517 hooks

Agreed, and that’s essentially my point. I don’t think pip’s cache strategy is much use here, so I’d be inclined to have pip pass a temporary directory and in effect not cache at all. Or more easily for pip, pass None to tell the backend they can cache in a temporary location, because pip isn’t going to do anything else.

What I’m less comfortable about (because I’m not clear on the intended semantics of persisting this information) is whether the longer-term impact would be for front ends to get sucked into the question of how to handle incremental builds - which I very much don’t want to happen, as the backends are the experts here. So I don’t want to get into a state where backends say they can’t do incremental builds because frontends keep throwing away build artifacts, but frontends say they can’t do any better because only the backend understands how to invalidate the cache…