ditto/packages/ditto/DittoUploads.ts
2025-02-15 14:21:05 -06:00

16 lines
304 B
TypeScript

import { LRUCache } from 'lru-cache';
import { Time } from '@/utils/time.ts';
export interface DittoUpload {
id: string;
pubkey: string;
url: string;
tags: string[][];
uploadedAt: Date;
}
export const dittoUploads = new LRUCache<string, DittoUpload>({
max: 1000,
ttl: Time.hours(6),
});