Add router caching. (#248)

* Add router caching.

* Avoid memory leak by limiting cache size.

* Fix search result caching.

* Remove remains of previous player.

Fixes an issue where the spinner/loading from a previous player can show up in a cached page.
This commit is contained in:
FireMasterK
2021-07-07 19:48:09 +05:30
committed by GitHub
parent 9345e1a917
commit b0d9145e75
6 changed files with 36 additions and 21 deletions

View File

@@ -5,7 +5,11 @@
:class="{ 'uk-light': darkMode }"
>
<Navigation />
<router-view />
<router-view v-slot="{ Component }">
<keep-alive :max="5">
<component :key="$route.fullPath" :is="Component" />
</keep-alive>
</router-view>
<div style="text-align: center">
<a aria-label="GitHub" href="https://github.com/TeamPiped/Piped">