Fix purge_cache