[GH-ISSUE #3270] Make cache optional #1160

Open
opened 2026-03-16 01:46:27 +03:00 by kerem · 2 comments
Owner

Originally created by @Sytten on GitHub (Sep 11, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3270

Is your feature request related to a problem? Please describe.
Right now the client doesn't offer the possibility to disable the cache entirely.
We do our own caching in the consumer of the resolver and we don't want to double caching.

Describe the solution you'd like
A way to turn off caching and disable the moka dependency.

Describe alternatives you've considered

  • Let hickory do the caching. This is fine for some cases, but we do a mix of hickory and os name resolution so we need to implement our own caching.
  • Simpler/dumb caching mechanism, moka is a big dependency with lots of moving parts that ideally we would want to avoid in general. There are simpler libraries for caching out there, specially if we do cache eviction in hickory.
Originally created by @Sytten on GitHub (Sep 11, 2025). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3270 **Is your feature request related to a problem? Please describe.** Right now the client doesn't offer the possibility to disable the cache entirely. We do our own caching in the consumer of the resolver and we don't want to double caching. **Describe the solution you'd like** A way to turn off caching and disable the moka dependency. **Describe alternatives you've considered** - Let hickory do the caching. This is fine for some cases, but we do a mix of hickory and os name resolution so we need to implement our own caching. - Simpler/dumb caching mechanism, moka is a big dependency with lots of moving parts that ideally we would want to avoid in general. There are simpler libraries for caching out there, specially if we do cache eviction in hickory.
Author
Owner

@Sytten commented on GitHub (Sep 11, 2025):

If this is something you are willing to consider @djc I can push the implementation.

<!-- gh-comment-id:3281278779 --> @Sytten commented on GitHub (Sep 11, 2025): If this is something you are willing to consider @djc I can push the implementation.
Author
Owner

@djc commented on GitHub (Sep 11, 2025):

Sure, I'll have a look at a PR.

<!-- gh-comment-id:3281440493 --> @djc commented on GitHub (Sep 11, 2025): Sure, I'll have a look at a PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1160
No description provided.