lrucache fix
This commit is contained in:
parent
a66f7f5fd8
commit
29cb9a61b4
@ -12,7 +12,7 @@ const cache = new LRUCache<string, NostrEvent[]>({ maxSize: 100 });
|
||||
|
||||
export function useWorkerRelayView(id: string, filters: Array<ReqFilter>, leaveOpen?: boolean, maxWindow?: number) {
|
||||
const cacheKey = useMemo(() => JSON.stringify(filters), [filters]);
|
||||
const [events, setEvents] = useState<Array<NostrEvent>>(cache.get(cacheKey) ?? []);
|
||||
const [events, setEvents] = useState<Array<NostrEvent>>(cache.get(cacheKey) || []);
|
||||
const [rb, setRb] = useState<RequestBuilder>();
|
||||
const system = useContext(SnortContext);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user