clean up the cache functions