Using https://gdal.org/en/stable/api/cpl.html#_CPPv417VSICurlClearCachev and the partial function.
The case for this is made in #3254 and at least one previous issue. I think there could be a better API for this, but providing a method to partially or fully invalidate GDAL's vsicurl cache is a good start.