I've a cosmetic Issue with my pihole installation. It seems that client hostnames are cached somewhere and are not updated.
Is there a way to clear this cache?
Expected Behaviour:
Local Hostnames are frequently updated / cached old hostnames are deleted after e.g. 12 hrs.
Actual Behaviour:
Old hostnames are cached somewhere and aren't updated:
The screenshot looks like it came from the index page Top Clients. If that is the case then those are the entries of the name of the host at the time the query was made. They do not dynamically update.
I've had this same problem this evening. After booting this Mac on a Linux Mint live CD for a couple of hours, once I was back on macOS Pi-hole insisted that my hostname was still mint.lan for queries that were being generated right now. I had the same IP for both sessions since it's the same wired network adapater. Pi-hole is the DHCP.
I tried deleting it from the Network view and it came right back as mint.lan. I also tried the Flush network table option you listed and it made no difference.
I then took the nuclear option and rebooted the Pi-hole and that did fix it. Interestingly the Long-term data showed recent queries as mint.lan and then changing to the Mac hostname after the relevant PTR request from localhost (the Pi-hole) for the Mac's reverse IP.
The entire Query Log last 100 entries however showed the Mac hostname for everything. Presumably because the Query Log is populated from the Long-term data on boot.
Long-term data Query shows Mint hostname
Main Query Log shows same transactions using current Mac hostname
Would I be right to say that it was the PTR request for the Mac which actually "fixed" the problem? Image below from Long-term data, since main Query Log now shows correct hostnames where it was incorrect before, as shown above. Dashboard also no longer has any record of mint.lan.