ObjFW  View Ticket

20:13 Ticket [316edadc24] Add a cache in OFDNSResolver status still Fixed with 1 other change artifact: d8a136d0a7 user: js
13:33 Ticket [316edadc24]: 3 changes artifact: 377a0f9faf user: js
16:30 Fixed ticket [316edadc24]. artifact: 911cb9ad04 user: js
14:39 Ticket [316edadc24]: 4 changes artifact: ac9c40eb73 user: js
22:15 Ticket [316edadc24]: 5 changes artifact: c92fe9eba5 user: js
17:45 New ticket [316edadc24]. artifact: 74018adb03 user: js

Ticket UUID: 316edadc2411d1b5e5597c32da432c72056ca771
Title: Add a cache in OFDNSResolver
Status: Fixed Type: Feature Request
Severity: Important Priority: Medium
Subsystem: Resolution: Fixed
Last Modified: 2024-05-22 20:13:26
Version Found In: Milestone: 1.1
User Comments:
js added on 2022-11-27 17:45:29:

Currently, OFHostAddressResolver queries the DNS server every time. However, this means no caching is performed when performing multiple connections to the same host. Look at the returned TTL and keep it in a cache for that long.

js added on 2022-11-28 22:15:17:

Actually, it probably makes more sense to add the cache in OFDNSResolver, as there is very little reason for any kind of DNS query to be repeated if the TTL hasn't expired yet.

This cache probably makes most sense to be per-instance, even though that means there is no reuse between threads. But the added locking on every lookup is probably worse than just doing one lookup per thread.

js added on 2023-07-15 14:39:00:

This is not causing any problems and purely a performance optimization, so really shouldn't block 1.0.

js added on 2023-12-29 16:30:06: