cache: a byte budget of 256 bytes per entry bounds the cached answers, evicting by clock, and a full or failed copy is counted instead of swallowed
This commit is contained in:
@@ -326,7 +326,7 @@ pub const Plan = struct {
|
||||
|
||||
if (self.ops.contains(.cache)) {
|
||||
const candidate = try gpa.create(dns_cache.DnsCache);
|
||||
candidate.* = dns_cache.DnsCache.init(gpa, self.cfg.cache) catch |err| {
|
||||
candidate.* = dns_cache.DnsCache.init(gpa, .sized(self.cfg.cache.size)) catch |err| {
|
||||
gpa.destroy(candidate);
|
||||
return err;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user