Merge remote-tracking branch 'origin/main' into gossip-model
This commit is contained in:
18
packages/app/src/Cache/PaymentsCache.ts
Normal file
18
packages/app/src/Cache/PaymentsCache.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Payment, db } from "Db";
|
||||
import FeedCache from "./FeedCache";
|
||||
|
||||
class Payments extends FeedCache<Payment> {
|
||||
constructor() {
|
||||
super("PaymentsCache", db.payments);
|
||||
}
|
||||
|
||||
key(of: Payment): string {
|
||||
return of.url;
|
||||
}
|
||||
|
||||
takeSnapshot(): Array<Payment> {
|
||||
return [...this.cache.values()];
|
||||
}
|
||||
}
|
||||
|
||||
export const PaymentsCache = new Payments();
|
Reference in New Issue
Block a user