From 1ed3e0abaa272d834d084eb43b70f35b77265766 Mon Sep 17 00:00:00 2001 From: Seth Trowbridge Date: Fri, 21 Apr 2023 22:21:04 -0400 Subject: [PATCH] server record clearing --- lib/iso.tsx | 2 +- server.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/iso.tsx b/lib/iso.tsx index f6f07c8..ab1fb2e 100644 --- a/lib/iso.tsx +++ b/lib/iso.tsx @@ -164,7 +164,7 @@ export type FetchRecord = {URL:string, CacheFor:number, CachedAt:number, CacheOn export const Fetch = { Cache:new Map() as Map, ServerBlocking:false as false|Promise[], - ServerTouched:new Set() as Set, + ServerTouched:false as false|Set, Seed(seed:FetchRecord[]) { seed.forEach(r=>{ diff --git a/server.tsx b/server.tsx index 68465b7..a6efd9a 100644 --- a/server.tsx +++ b/server.tsx @@ -222,6 +222,7 @@ FileListen("${url.pathname}", reloadHandler);`; else { Iso.Fetch.ServerBlocking = []; + Iso.Fetch.ServerTouched = new Set(); let bake = SSR(); while(Iso.Fetch.ServerBlocking.length) { @@ -237,7 +238,7 @@ FileListen("${url.pathname}", reloadHandler);`; delete r.Promise; seed.push(r); }); - Iso.Fetch.ServerTouched = new Set(); + Iso.Fetch.ServerTouched = false; const results = Twind.extract(bake, TwindInst);