Add workarond for cache:purge not clearing cache directory.

The problem is probably related to the use of a cache backend other than file.