From 4dc72986d0ce43f611f5bee71b87a3f27b27c628 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 7 Oct 2025 11:07:12 -0700 Subject: [PATCH] IO-3373 Remove Cache Eviction Signed-off-by: Allan Carr --- .../dashboard-grid/dashboard-grid.component.jsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/client/src/components/dashboard-grid/dashboard-grid.component.jsx b/client/src/components/dashboard-grid/dashboard-grid.component.jsx index 8a214051e..72f029c2e 100644 --- a/client/src/components/dashboard-grid/dashboard-grid.component.jsx +++ b/client/src/components/dashboard-grid/dashboard-grid.component.jsx @@ -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);