mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-09 12:51:45 -04:00
rename RenewRequest to RenewResponse
This commit is contained in:
2 files changed
+5
-5
No files matched your search
Vendored
+3
-3
@@ -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,
|
||||
|
||||
Vendored
+2
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user