import { fetchFlushChartCache } from '../../http/fetcher' ; import { removeCachedData , fetchCachedData } from '../../../utils/cache' ; import { ChartCachedKeys } from '../../../constants/cache' ; export const flushCacheInfo = ( ) => { fetchFlushChartCache ( ) . then ( ( wrapper ) => { if ( wrapper && wrapper . attributes . flushCacheInfo . length > 0 ) { for ( const [ , value ] of Object . entries ( ChartCachedKeys ) ) { removeCachedData ( fetchCachedData ( value ) as string ) ; removeCachedData ( value ) ; } } } ) ; } ; export default flushCacheInfo ;