summaryrefslogtreecommitdiffstats
path: root/utils/cache_gc/README.rst
blob: 8d991b294bc751f0d67b6926be90bb99e1d13efe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.. SPDX-License-Identifier: GPL-3.0-or-later

.. _garbage-collector:

Garbage Collector
-----------------

.. note:: When using systemd, ``kres-cache-gc.service`` is enabled by default
   and does not need any manual configuration.

Knot Resolver employs a separate garbage collector daemon which periodically
trims the cache to keep its size below size limit configured using
:envvar:`cache.size`.

To execute the daemon manually, you can use the following command to run it
every second:

.. code-block:: bash

   $ kres-cache-gc -c /var/cache/knot-resolver -d 1000