<button onClick={async () => { try { const { cacheDebugger } = awaitimport( "../../api/matching/manga-search-service" ); if ( window.confirm( "Are you sure you want to clear all caches? This will require re-fetching all manga data.", ) ) { cacheDebugger.resetAllCaches();
// Also clear pending manga data if (onClearPendingManga) { onClearPendingManga(); }
alert("All caches have been cleared."); } } catch (e) { console.error("Failed to reset caches:", e); } }} className="text-muted-foreground hover:text-foreground inline-flex items-center text-xs" aria-label="Reset all caches" > <RefreshCwclassName="mr-1 h-3 w-3" /> ResetCaches </button> </div> </CardFooter> </Card> </motion.div> ); };
Example
<ErrorDisplayerror="Failed to match manga"detailedError={apiError}onRetry={handleRetry}/>
Displays an error card with details, retry, navigation, and cache management options for manga matching errors.
Source
Example