Improve cache cleaning