For long-running scripts such as batch import/export, using the inmemory cache is a drag, as it can just accumulate indefinitely.
The "easy" way out, afaik, is to define a separate Sf environment which is used to run cli commands, where the inmmemory cache is disabled.
But I find a bit cumbersome to have to define a separate environment only for that.
It would be nice to have a setting dedicated to disabling inmemory cache based con command-line execution