Lightpanda: the headless browser designed for AI and automation
rename RenewRequest to RenewResponse
Muki Kiboigo6433ca7df2d5
diff --git a/src/network/cache/Cache.zig b/src/network/cache/Cache.zigindex 33a08262a..809612425 100644--- a/src/network/cache/Cache.zig+++ b/src/network/cache/Cache.zig@@ -55,7 +55,7 @@ pub fn evict(self: *Cache, url: []const u8) void {};}-pub fn renew(self: *Cache, arena: std.mem.Allocator, req: RenewRequest) !void {+pub fn renew(self: *Cache, arena: std.mem.Allocator, req: RenewResponse) !void {return switch (self.kind) {inline else => |*c| c.renew(arena, req),};@@ -174,7 +174,7 @@ pub const CachedMetadata = struct {return self.etag != null or self.last_modified != null;}- pub fn renew(self: *CachedMetadata, req: RenewRequest) void {+ pub fn renew(self: *CachedMetadata, req: RenewResponse) void {self.stored_at = req.timestamp;self.age_at_store = 0;@@ -201,7 +201,7 @@ pub const CacheRequest = struct {request_headers: []const Http.Header,};-pub const RenewRequest = struct {+pub const RenewResponse = struct {url: []const u8,timestamp: i64,headers: []const Http.Header,diff --git a/src/network/cache/FsCache.zig b/src/network/cache/FsCache.zigindex ade474624..99de8b338 100644--- a/src/network/cache/FsCache.zig+++ b/src/network/cache/FsCache.zig@@ -23,7 +23,7 @@ const Cache = @import("Cache.zig");const log = lp.log;const CacheRequest = Cache.CacheRequest;-const RenewRequest = Cache.RenewRequest;+const RenewResponse = Cache.RenewResponse;const CachedMetadata = Cache.CachedMetadata;const CachedResponse = Cache.CachedResponse;@@ -299,7 +299,7 @@ pub fn evict(self: *FsCache, url: []const u8) void {};}-pub fn renew(self: *FsCache, arena: std.mem.Allocator, req: RenewRequest) !void {+pub fn renew(self: *FsCache, arena: std.mem.Allocator, req: RenewResponse) !void {const hashed_key = hashKey(req.url);const cache_p = cachePath(&hashed_key);