From 8c67d2fde1e7cd76b998012d8ee75a47e46ddd7e Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Thu, 29 Jul 2021 10:10:03 -0700 Subject: [PATCH] Fixed cache issue for schema --- ui/src/app/metadata/hoc/MetadataSchema.js | 4 +++- ui/src/app/metadata/hooks/api.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/src/app/metadata/hoc/MetadataSchema.js b/ui/src/app/metadata/hoc/MetadataSchema.js index ec6dd49f0..c8a8365ee 100644 --- a/ui/src/app/metadata/hoc/MetadataSchema.js +++ b/ui/src/app/metadata/hoc/MetadataSchema.js @@ -9,7 +9,9 @@ export function MetadataSchema({ type, children, wizard = false }) { const definition = React.useMemo(() => wizard ? getWizard(type) : getDefinition(type), [type, wizard]); - const { get, response } = useFetch(``, {}, []); + const { get, response } = useFetch(``, { + cachePolicy: 'no-cache' + }); const [schema, setSchema] = React.useState(); diff --git a/ui/src/app/metadata/hooks/api.js b/ui/src/app/metadata/hooks/api.js index d0f30ef38..cc2afa9c7 100644 --- a/ui/src/app/metadata/hooks/api.js +++ b/ui/src/app/metadata/hooks/api.js @@ -61,7 +61,8 @@ export const xmlRequestInterceptor = ({ options }) => { export function useMetadataEntityXml(type = 'source', opts = { interceptors: { request: xmlRequestInterceptor - } + }, + cachePolicy: 'no-cache' }) { return useFetch(`${API_BASE_PATH}${getMetadataPath(type)}`, opts); }