What: Have a setting that allows the user to set an interval for purging query data that is older than the specified period. This would be a different setting to the anonymous query logging.
How: At a 24 hour interval (same time as one that handles log rotation and other tasks?), delete any logged queried domains from the database that are timestamped older than the purge setting length, and if exists, delete any pihole related logs files that contain domain name lookups outside the same period.
Why: Users can have detailed query log information and statistics for a period they choose, with queries they consider no longer useful purged. This would benefit users who don't want the privacy risk of storing lots of data but do want the benefit of short term data. The setting for anonymous query logging does not achieve this scenario.
Suggested range: A number between 1-365 representing how many days data can live for. If left blank or 0, follow existing default behavior instead.
This only relates to DNS lookups (as visible in the 'query log') and is not related to the storage of the blocklists or local devices.
I tried to post in Feature Requests but the button is disabled for the main category and posting directly into one of the sub categories seems wrong.