rename RenewRequest to RenewResponse

This commit is contained in:
Muki Kiboigo committed 2026-06-17 20:32:58 -07:00
1 parent 438a5f4320
commit 6433ca7df2
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -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,
+2 -2
View File
@@ -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);