Complete the code to wrap the component with keep-alive.
<template> <[1]> <MyComponent /> </[1]> </template>
The keep-alive tag caches the component to preserve its state.
Complete the code to cache only components named 'Home' and 'Profile'.
<keep-alive include="[1]"> <component :is="currentView" /> </keep-alive>
The include attribute takes a comma-separated list of component names with exact casing.
Fix the error in the code to properly cache components except 'Settings'.
<keep-alive exclude="[1]"> <component :is="currentView" /> </keep-alive>
The exclude attribute requires a string with component names in quotes.
Fill both blanks to cache components with names starting with 'User' and exclude 'UserAdmin'.
<keep-alive include="[1]" exclude="[2]"> <component :is="currentView" /> </keep-alive>
The include supports wildcards like User* to match names starting with 'User'. The exclude attribute lists exact names to skip caching.
Fill all three blanks to cache components with keys and control caching with max and max-age.
<keep-alive :include="[1]" :max="[2]" :max-age="[3]"> <component :is="currentView" /> </keep-alive>
The :include prop takes an array of component names with exact casing. :max limits the number of cached components. :max-age sets cache duration in milliseconds.