#644482 by hass (backport of #452936): use TRUNCATE to do full cache clearing, which results in a dramatic speed increase