Files
systemd/man
ishwarbb 133909c8f6 resolved: add configurable DNS cache size
Add CacheSize= option to [Resolve] section of resolved.conf to allow
configuring the maximum number of entries in the per-scope DNS cache.
The default remains 4096 entries. Setting this to 0 disables caching
(similar to Cache=no).

CacheSize= is only read when Cache=yes or Cache=no-negative. When
Cache=no, caching is fully disabled regardless of CacheSize=.

Changes:
- Add cache_size field to Manager struct
- Parse CacheSize= from resolved.conf via gperf
- Thread cache_size through dns_cache_put() and helper functions
- Replace hard-coded CACHE_MAX with the configurable cache_size
- When cache_size is 0 or Cache=no, flush cache and skip caching
- Add man page documentation for the new option
- Add unit tests for cache size enforcement

Co-developed-by: Claude <claude@anthropic.com>
2026-05-18 11:45:03 +01:00
..
2026-05-01 07:10:31 +02:00
2024-12-25 17:00:31 +01:00
2024-11-24 01:11:42 +09:00
2025-09-18 10:57:38 +01:00
2025-08-10 13:40:32 +02:00
2025-08-11 10:30:26 +02:00
2025-10-04 18:13:27 +02:00
2025-08-11 10:30:26 +02:00
2025-08-11 10:30:26 +02:00
2026-04-17 21:12:16 +01:00
2024-12-25 17:00:31 +01:00
2026-05-12 18:31:26 +02:00
2024-12-25 17:00:31 +01:00
2026-05-15 13:46:08 +01:00
2024-12-25 17:00:31 +01:00
2025-08-10 13:40:32 +02:00
2024-12-25 17:00:31 +01:00
2026-01-06 08:48:05 +09:00
2026-02-20 01:18:54 +09:00
2026-03-18 14:58:43 +01:00
2025-07-16 05:47:38 +09:00
2026-05-15 13:46:08 +01:00
…
2024-11-06 19:06:40 +09:00
2025-09-18 10:57:38 +01:00
…