feat(ui): add global query cache leveraging Redis (#5811)

This commit is contained in:
Thomas authored and GitHub committed 2026-06-10 18:52:06 +02:00
1 parent 29bd7101b1
commit 74443a49b2
68 files changed
+843 -191

No files matched your search

+11 -6
View File
@@ -26,17 +26,22 @@ interface TimetableWidgetInnerProps {
}
const TimetableWidgetInner = ({ station, integrationId }: TimetableWidgetInnerProps) => {
const [timetable] = clientApi.widget.timetable.getTimetable.useSuspenseQuery({
integrationId,
stationId: station.value,
limit: 10,
});
const { data: timetable } = clientApi.widget.timetable.getTimetable.useQuery(
{
integrationId,
stationId: station.value,
limit: 10,
},
{
staleTime: 60 * 1000,
},
);
const t = useScopedI18n("widget.timetable");
return (
<Stack w="100%" gap="xs" p="sm">
<Text fw="bold">{t("title", { station: station.label })}</Text>
{timetable.entries.map((entry) => (
{(timetable?.entries ?? []).map((entry) => (
<Group key={`${entry.timestamp.toISOString()}-${entry.location}`} justify="space-between" w="100%">
<Group gap="sm">
{entry.line && (