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:
+1
-1
@@ -718,7 +718,7 @@ fn serve(r: cli.Runner, args: cli.RunArgs) !u8 {
|
||||
const both = blk: {
|
||||
const c = try gpa.create(dns_cache.DnsCache);
|
||||
errdefer gpa.destroy(c);
|
||||
c.* = try .init(gpa, cfg.cache);
|
||||
c.* = try .init(gpa, .sized(cfg.cache.size));
|
||||
errdefer c.deinit();
|
||||
|
||||
const l = try gpa.create(rate_limiter.RateLimiter);
|
||||
|
||||
Reference in New Issue
Block a user