diff --git a/app/components/Avatar.tsx b/app/components/Avatar.tsx index 11fa6ffa6..496099769 100644 --- a/app/components/Avatar.tsx +++ b/app/components/Avatar.tsx @@ -1,4 +1,5 @@ import clsx from "clsx"; +import { LRUCache } from "lru-cache"; import * as React from "react"; import type { Tables } from "~/db/tables"; import { useHydrated } from "~/hooks/useHydrated"; @@ -18,7 +19,7 @@ const dimensions = { lg: 125, } as const; -const identiconCache = new Map(); +const identiconCache = new LRUCache({ max: 500 }); function hashString(str: string) { let hash = 5381;