IO-3373 Remove Cache Eviction

Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
Allan Carr
2025-10-07 11:07:12 -07:00
parent 7ffb2c1aad
commit 4dc72986d0

View File

@@ -1,5 +1,5 @@
import Icon, { SyncOutlined } from "@ant-design/icons";
import { useMutation, useQuery, useApolloClient } from "@apollo/client";
import { useMutation, useQuery } from "@apollo/client";
import { Button, Dropdown, Space } from "antd";
import { PageHeader } from "@ant-design/pro-layout";
import { useMemo, useState, useEffect } from "react";
@@ -33,7 +33,6 @@ const mapDispatchToProps = () => ({
export function DashboardGridComponent({ currentUser }) {
const { t } = useTranslation();
const client = useApolloClient();
const notification = useNotification();
// Constants for layout defaults
@@ -114,11 +113,6 @@ export function DashboardGridComponent({ currentUser }) {
return false;
}
// Note: Removed Apollo cache update to prevent triggering unwanted Redux actions
// Instead, evict the dashboard bodyshop query from cache to ensure fresh data on next fetch
client.cache.evict({ fieldName: "dashboard_bodyshops" });
client.cache.gc();
return true;
} catch (err) {
console.error(`Dashboard ${errorContext} failed`, err);