import type { UsersRelays } from "." import { type CacheStore, FeedCache } from "@snort/shared" export class UserRelaysCache extends FeedCache { constructor(store?: CacheStore) { super("UserRelays", store) } key(of: UsersRelays): string { return of.pubkey } override async preload(follows?: Array): Promise { await super.preload() if (follows) { await this.buffer(follows) } } newest(): number { let ret = 0 this.cache.forEach(v => (ret = v.created > ret ? v.created : ret)) return ret } takeSnapshot(): Array { return [...this.cache.values()] } async search() { return >[] } }