properly clean the cache