1
0
forked from Kieran/snort

refactor: remove slow sha256 from interaction cache

This commit is contained in:
Kieran 2024-01-08 11:10:41 +00:00
parent 13da7f822c
commit 29ca482511
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -1,7 +1,6 @@
import { FeedCache } from "@snort/shared";
import { db, EventInteraction } from "@/Db";
import { sha256 } from "@/Utils";
import { LoginStore } from "@/Utils/Login";
export class EventInteractionCache extends FeedCache<EventInteraction> {
@ -10,7 +9,7 @@ export class EventInteractionCache extends FeedCache<EventInteraction> {
}
key(of: EventInteraction): string {
return sha256(of.event + of.by);
return `${of.event}:${of.by}`;
}
override async preload(): Promise<void> {