Fix cache handling.