mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-12-28 23:42:48 +00:00
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:
@@ -86,16 +86,13 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.updateResults();
|
||||
},
|
||||
activated() {
|
||||
window.addEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
unmounted() {
|
||||
deactivated() {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
watch: {
|
||||
"$route.query.search_query": function(q) {
|
||||
if (q) this.updateResults();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async fetchResults() {
|
||||
return await await this.fetchJson(this.apiUrl() + "/search", {
|
||||
|
||||
Reference in New Issue
Block a user