Versions 2 to 318
new file, 187 lines
8+
10+
11+test("indexed view cache keys never enumerate membership and remain bounded by eviction", () => {
29+ assert.notEqual(cache.view(set), view, "indexed identities obey the same cache eviction limit");
32+
37+
63+
67+
78+
79+test("the cache retains exactly VIEW_COUNT views and evicts the least recently used one", () => {
89+ for (let i = 1; i < retained.length; i++) assert.equal(get(cache, `key-${i + 1}`), retained[i]);
93+
105+
106+test("trim reweighs growth with no further hit and evicts until the views fit (abso Capacity)", () => {
112+ // A call lays files out in the older view after the cache last weighed it, and nothing asks for it again.
119+
129+
147+
148+test("trim lets go of the least recently used file layouts across views before whole views (abso Capacity)", () => {
150+ const lines = (name: string) => Array.from({ length: 40 }, (_, i) => `${name} line ${i}\n`).join("");
152+ buildBase({ "a.txt": lines("a"), "b.txt": lines("b"), "c.txt": lines("c") }, { author: "test", message: "base" }),
- MCP
- compare on this site's /mcp
- CLI
- abso diff 2 318 worker/project/test/view-cache.test.ts --json
- JSON
- /christopher/abso-core/compare/2..318?file=worker%2Fproject%2Ftest%2Fview-cache.test.ts&format=json