Fix cache tests