I am using useLazy fetch in a very simple two page application, i have passed a constant string as a key to useLazyFetch, but upon navigating to profile page and coming back to index page it again fetches the data.
pages/index.vaue
<template>
<div v-if="listPending">{{ listPending }}</div>
<div v-else>{{ countryList }}</div>
</template>
<script setup>
const URL = "https://fakestoreapi.com/products?limit=5";
let {pending: listPending, data: countryList} = useLazyFetch(`${URL}/countryList`, {
key: URL
});
</script>
pages/profile.vue
<template>
Profile Page
</template>
and below is the layouts/default.vue i use this to navigate between pages
<template>
<div>
<NuxtLink to="/">Dashboard</NuxtLink>
<NuxtLink to="profile">Profile</NuxtLink>
</div>
<slot/>
</template>
am i using the key option in a wrong way ? i also tried passing key="qwerty", but it still refetches the data upon page navigation.