Add debug logging statements to cache code.