Refresh pages in vue.js keep-alive section
I don't think there is an easy way to do this(programmatically) so you are left with 2 options.
Options 1 would be to reset the state which means you internally keep track of the initial state and listen for something like an emit on logout to reset the component to its initial state.
Option 2 would be to simply swap out the keep-alive
component using something like this:
<keep-alive v-if="loggedIn">
<router-view></router-view>
</keep-alive>
<router-view v-else></router-view>