// src/stores/timeCache.ts import { defineStore } from 'pinia' import { RouteLocationNormalizedLoaded } from 'vue-router' interface TimeCacheState { cache: Map } export const useTimeCacheStore = defineStore('timeCache', { state: (): TimeCacheState => ({ cache: new Map() }), actions: { setCache(routePath: string, interval: number | undefined, timeValue: any) { this.cache.set(routePath, { interval, timeValue }) }, getCache(routePath: string) { return this.cache.get(routePath) }, hasCache(routePath: string) { return this.cache.has(routePath) } } })