Where is the Pihole DNS cache and how do I clear it?

Have you checked the local hosts files on the Pi? Pi-hole can use these for local name resolution.

Configured in a config file in /etc/dnsmasq.d/
/etc/hosts
/etc/pihole/local.list
/etc/pihole/custom.list