Cache reimplementation

This commit is contained in:
2025-10-10 13:09:11 +02:00
parent 6717e6b0de
commit a199b104ad
8 changed files with 356 additions and 155 deletions

View File

@@ -5,6 +5,7 @@ import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogT
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import { useCache } from "@/hooks/useCache";
import { useLoading } from "@/hooks/useLoading";
import { created, DEBOUNCE, modified } from "@/snippets";
import { RepertoireId } from "common";
@@ -93,7 +94,7 @@ namespace RepertoireRow {
function RepertoireRow(props: RepertoireRow.Props) {
const { isLoading, error, data: repertoire } = useLoading(Effect.uninterruptible(repertoireCache.get(props.repertoireId)), [props.repertoireId]);
const { isLoading, error, data: repertoire } = useCache(repertoireCache, props.repertoireId);
if (isLoading) {
return (