Fix the cache handling