shortcircuit a lot of caching checks

This commit is contained in:
Muki Kiboigo
2026-03-26 17:36:32 -07:00
parent 024fbdd118
commit 0720984a4e
3 changed files with 46 additions and 58 deletions

View File

@@ -142,8 +142,8 @@ pub fn get(self: *FsCache, arena: std.mem.Allocator, req: CacheRequest) ?Cache.C
};
}
pub fn put(self: *FsCache, req: CacheRequest, meta: CachedMetadata, body: []const u8) !void {
const hashed_key = hashKey(req.url);
pub fn put(self: *FsCache, meta: CachedMetadata, body: []const u8) !void {
const hashed_key = hashKey(meta.url);
const meta_p = metaPath(&hashed_key);
const meta_tmp_p = metaTmpPath(&hashed_key);
const body_p = bodyPath(&hashed_key);