diff --git a/src/network/cache/SqliteCache.zig b/src/network/cache/SqliteCache.zig index 43b8d2d71..fdece30d1 100644 --- a/src/network/cache/SqliteCache.zig +++ b/src/network/cache/SqliteCache.zig @@ -68,7 +68,21 @@ const cache_migrations: []const Migration = &.{ .{ .sql = "create index header_url on header(url)" }, }; -pub const SqliteCachePath = union(enum) { path: []const u8, memory }; +pub const SqliteCachePath = union(enum) { + path: []const u8, + memory, + + pub fn format( + self: SqliteCachePath, + writer: *std.Io.Writer, + ) std.Io.Writer.Error!void { + const name = switch (self) { + .memory => "memory", + .path => |p| p, + }; + try writer.writeAll(name); + } +}; pub fn init(allocator: std.mem.Allocator, path: SqliteCachePath) !SqliteCache { var pool = switch (path) {