fix purge_cache