chore: disable caches

This commit is contained in:
2024-12-21 13:55:28 +00:00
parent 609361d40c
commit 1f0f45e3f9
5 changed files with 26 additions and 25 deletions

View File

@ -1,25 +1,24 @@
import { removeUndefined, throwIfOffline } from "@snort/shared";
import { mapEventToProfile, NostrEvent, NostrSystem } from "@snort/system";
import { EventsCache, Relay, RelayMetrics, SystemDb, UserCache, UserFollows, UserRelays } from "@/Cache";
import { addEventToFuzzySearch } from "@/Db/FuzzySearch";
import { LoginStore } from "@/Utils/Login";
import { hasWasm, WasmOptimizer } from "@/Utils/wasm";
/**
* Singleton nostr system
*/
export const System = new NostrSystem({
relays: UserRelays,
events: EventsCache,
profiles: UserCache,
relayMetrics: RelayMetrics,
cachingRelay: Relay,
contactLists: UserFollows,
optimizer: hasWasm ? WasmOptimizer : undefined,
db: SystemDb,
//relays: UserRelays,
//events: EventsCache,
//profiles: UserCache,
//relayMetrics: RelayMetrics,
//cachingRelay: Relay,
//contactLists: UserFollows,
//optimizer: hasWasm ? WasmOptimizer : undefined,
//db: SystemDb,
buildFollowGraph: true,
automaticOutboxModel: true,
checkSigs: false,
});
System.on("auth", async (c, r, cb) => {
@ -31,8 +30,8 @@ System.on("auth", async (c, r, cb) => {
});
System.on("event", (_, ev) => {
EventsCache.discover(ev);
UserCache.discover(ev);
//EventsCache.discover(ev);
//UserCache.discover(ev);
addEventToFuzzySearch(ev);
});