@@ -1,6 +1,3 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
pub const Cache = @This();
alloc: Allocator,
@@ -11,6 +8,13 @@ alloc: Allocator,
// commit_flex: COMMIT_FLEX,
//},
/// Basically a thin wrapper around StringHashMap
pub fn Cacher(T: type) type {
return struct {
cache: StringHashMap(T),
};
}
const COMMIT_FLEX = @import("endpoints/commit-flex.zig");
pub fn init(a: Allocator) !Cache {
COMMIT_FLEX.initCache(a);
@@ -22,3 +26,7 @@ pub fn init(a: Allocator) !Cache {
pub fn raze(c: Cache) void {
COMMIT_FLEX.razeCache(c.alloc);
}
const std = @import("std");
const Allocator = std.mem.Allocator;
const StringHashMap = std.StringHashMap;