Skip to content

Commit

Permalink
Clear gradesCache when clearing websocCache
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhxNguyen7 committed Aug 26, 2023
1 parent ead9dad commit 7aadb4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/antalmanac/src/lib/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const websocCache: { [key: string]: CacheEntry } = {};

export function clearCache() {
Object.keys(websocCache).forEach((key) => delete websocCache[key]); //https://stackoverflow.com/a/19316873/14587004
Object.keys(gradesCache).forEach((key) => delete gradesCache[key]); //https://stackoverflow.com/a/19316873/14587004
}

function cleanParams(record: Record<string, string>) {
Expand Down

0 comments on commit 7aadb4a

Please sign in to comment.