cache: whack "set but not used" warnings
(cherry picked from commit 7e9680d3be484baac7fe78cef2be4e7ce4b4946f)