Currently, the result of the following commands dump the content of the cache into the pihole log.
pi@raspberrypi:~ $ ps -e | grep pihole-FTL
2859 ? 00:00:14 pihole-FTL
pi@raspberrypi:~ $ sudo kill -10 2859
This is the SIGUSR1 signal, see Linux signal man for values, see the dnsmasq man for an explanation, quote:
Enable a full cache dump on receipt of SIGUSR1
The (partial) result, currently in the pihole log:
Oct 6 13:21:56 dnsmasq[2859]: geoffreyhand.co.uk 0.0.0.0 4F I H
Oct 6 13:21:56 dnsmasq[2859]: explosiondigital.com.ve 0.0.0.0 4F I H
Oct 6 13:21:56 dnsmasq[2859]: 8199wnsr.com 0.0.0.0 4F I H
Oct 6 13:21:56 dnsmasq[2859]: www.alarm-error-q3zdam25n.stre 0.0.0.0 4F I H
Oct 6 13:21:56 dnsmasq[2859]: gmviagens.com.br F I H
Oct 6 13:21:56 dnsmasq[2859]: www.lotusapps.net 0.0.0.0 4F I H
Oct 6 13:21:56 dnsmasq[2859]: ifasthost.eu F I H
feature request: redirect the output of the cache dump to a database (cachedump.sql) to allow for sqlite3 queries on the cache.
I'm using phpliteadmin, see old topic here, updated installation instructions here (chapter 20 / section 3 - new version and php-mbstring required) to explore and query the sqlite3 databases.