useAsyncData — manual key. useFetch — auto key.
useAsyncData with key:
1<script setup>2const { data } = await useAsyncData("posts", () => {3 return $fetch("/api/posts")4})5</script>
useFetch with key:
1<script setup>2const { data } = await useFetch("/api/posts", {3 key: "posts-list"4})5</script>
Key differences: