Skip to content

Commit

Permalink
Update AppLayout, make cache consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
xbgmsharp committed Dec 18, 2024
1 parent 597ceba commit a5ec486
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/layouts/AppLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,17 @@
Array.isArray(CacheStore.moorages) &&
CacheStore.moorages.length == 0
) {
console.warn('Warning, invalid cache data, resetting cache.')
console.warn('Warning, invalid cache data (moorages), resetting cache.')
await CacheStore.resetCache()
}
// Check cache, do we have inconsistent data from cache.
if (
Array.isArray(CacheStore.logs) &&
CacheStore.logs.length == 0 &&
Array.isArray(CacheStore.moorages) &&
CacheStore.moorages.length > 1
) {
console.warn('Warning, invalid cache data (logs), resetting cache.')
await CacheStore.resetCache()
}
// Load dynamic data for graph and dashboard
Expand All @@ -128,7 +138,7 @@
onBeforeMount(async () => {
console.log('AppLayout onBeforeMount')
if (!GlobalStore.isLoggedIn && GlobalStore.isPublic) {
console.log('AppLayout anonymous access isPublic', GlobalStore.isPublic)
console.log('AppLayout onBeforeMount anonymous access isPublic', GlobalStore.isPublic)
return
}
await fetchSettings(true)
Expand Down

0 comments on commit a5ec486

Please sign in to comment.