diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2023-06-28 01:01:16 -0400 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2023-06-28 01:01:16 -0400 |
commit | e8a55c5400ac6ec4a14c8d3422edd1cc532dd2ac (patch) | |
tree | 5e138795db1bdd82a2a95829737ed837620ca6a4 /src/client/DocServer.ts | |
parent | 980ea88f1e1a3608920921048fca98e605bd5733 (diff) | |
parent | e0dcbdbb9a2eaf0bd39ccdaa73e23506ea93984a (diff) |
Merge branch 'master' into geireann_dash_components
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r-- | src/client/DocServer.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts index 02b047a95..2a7f5a09b 100644 --- a/src/client/DocServer.ts +++ b/src/client/DocServer.ts @@ -37,6 +37,7 @@ export namespace DocServer { return foundDocId ? (_cache[foundDocId] as Doc) : undefined; } + let lastCacheUpdate = 0; export function UPDATE_SERVER_CACHE(print: boolean = false) { if (print) { const strings: string[] = []; @@ -51,6 +52,8 @@ export namespace DocServer { if (!(StrCast(doc.author).includes('.edu') || StrCast(doc.author).includes('.com')) || doc.author == Doc.CurrentUserEmail) return true; return false; }); + if (filtered.length === lastCacheUpdate) return; + lastCacheUpdate = filtered.length; rp.post(Utils.prepend('/setCacheDocumentIds'), { body: { |