Fix cache logging bug