Is it possible to set pi-hole's cache to tmp in tmpfs?

This is of no benefit. Even with the default cache size of 10,000, you will likely never have a full cache. The cache information is retrieved with the following command and the example output is from a Pi-Hole that serves 21 clients (many of them IOT with repeated DNS queries).

echo ">cacheinfo" | nc 127.0.0.1 4711
cache-size: 10000
cache-live-freed: 0
cache-inserted: 9578

See the thread referenced below for details.

The cache is in memory and is not written to disk. There is no file to redirect to tmp or tmpfs.

2 Likes