fix and test purge cache