Lightpanda: the headless browser designed for AI and automation
properly use LRU EvictionQueue in Robots
Muki Kiboigo6ec287be3567
diff --git a/src/network/Robots.zig b/src/network/Robots.zigindex 6cd5dfada..7133a19c8 100644--- a/src/network/Robots.zig+++ b/src/network/Robots.zig@@ -138,8 +138,10 @@ pub const RobotStore = struct {self.mutex.lockUncancelable(lp.io);defer self.mutex.unlock(lp.io);- const entry = self.map.get(url) orelse return null;- return switch (entry) {+ const kv = self.map.getEntry(url) orelse return null;+ self.evictions.touch(kv.key_ptr.*);++ return switch (kv.value_ptr.*) {.allowed => .allowed,.disallowed => .blocked,.present => |robots| if (robots.isAllowed(path)) .allowed else .blocked,