lua: resurrect cache.clear('name')
(Continuation of https://gitlab.labs.nic.cz/knot/knot-resolver/merge_requests/583)
See the caveats described in docs.
For both functions we might add support to only consider exact name matches instead of subtrees, e.g. via optionally passing
trueas second parameter.
The return values are inconsistent. Proposal (slightly incompatible change): even if called without parameters, we return the number of removed records or a negative number on error (instead of
- We may add code doing asynchronous larger purges as suggested in docs.
- Recognize CNAME and DNAME.
truedoesn't allow to distinguish unvalidated negative records or outdated records. We might e.g. output something more useful than