properly deinit cache

This commit is contained in:
Muki Kiboigo
2026-03-30 08:44:10 -07:00
parent 7edb24e54d
commit 9c5e67fbf5
2 changed files with 8 additions and 0 deletions

View File

@@ -28,6 +28,12 @@ kind: union(enum) {
fs: FsCache,
},
pub fn deinit(self: *Cache) void {
return switch (self.kind) {
inline else => |*c| c.deinit(),
};
}
pub fn get(self: *Cache, arena: std.mem.Allocator, req: CacheRequest) ?CachedResponse {
return switch (self.kind) {
inline else => |*c| c.get(arena, req),