Skip to content

Commit

Permalink
tweak caching
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed May 7, 2024
1 parent 2f69ee3 commit 928e66c
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ export const useGetDataViewsTitleIdMap = () => {
return useQuery<DataViewListTitleIdMap, IHttpFetchError>(
[TRANSFORM_REACT_QUERY_KEYS.GET_DATA_VIEW_IDS_WITH_TITLE],
async () => {
// Since we let useQuery take care of caching,
// clear the cache to ensure we get the latest data view list.
data.dataViews.clearCache();

return (await data.dataViews.getIdsWithTitle()).reduce<Record<string, string>>(
return (await data.dataViews.getIdsWithTitle(true)).reduce<Record<string, string>>(
(acc, { id, title }) => {
acc[title] = id;
return acc;
Expand Down

0 comments on commit 928e66c

Please sign in to comment.