FIX: regression in cleanCache

This is an urgent fix for a regression (or a bug introduced) that seems to be here since v6r8. Strange that none noticed before...