` with `\u003CNuxtPage />`\r\n3. create a file `pages/index.vue`\r\n4. create a useAsyncData call:\r\n\r\n```\r\nconst { data, error } = await useAsyncData('test', async () => {\r\n if (process.server) {\r\n console.log('Server: hi');\r\n } else if (process.client) {\r\n console.log('Client: hi');\r\n }\r\n const response = await $fetch('/api/test')\r\n});\r\n```\r\n\r\n5. create a file `server/api/test.get.ts` with this code:\r\n\r\n```\r\nexport default defineEventHandler(async event => {\r\n console.log('test.get.ts hit')\r\n});\r\n```\r\n\r\n6. `npm run dev` and each time you refresh the page, the console log in terminal will show \r\n\r\n```\r\nServer: hi\r\ntest.get.ts hit\r\ntest.get.ts hit\r\n```\r\n\r\nI've tested this on my main project with a api endpoint that adds a row to the database, and it is adding two rows every refresh. \r\n\r\nI think the problem is that useAsyncData is running the full function both on server and client. It should not be re-fetching the data on client.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2017,2018],{"name":2003,"color":2004},{"name":2006,"color":2007},26049,"useAsyncData is running twice refetching data (server and client)","2024-03-03T08:53:17Z","https://github.com/nuxt/nuxt/issues/26049",0.624196,{"description":2025,"labels":2026,"number":2029,"owner":1994,"repository":1994,"state":2009,"title":2030,"updated_at":2031,"url":2032,"score":2033},"### Environment\n\nNuxt project info: 18:58:57\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.13.0`\r\n- Nuxt Version: `3.2.0`\r\n- Nitro Version: `2.2.1`\r\n- Package Manager: `npm@8.1.0`\r\n- Builder: `vite`\r\n- User Config: `srcDir`, `modules`, `alias`, `app`, `components`, `vite`, `pinia`, `ssr`\r\n- Runtime Modules: `@unocss/nuxt@0.49.4`, `@pinia/nuxt@0.4.6`\r\n- Build Modules: `-`\r\n------------------------------\r\n\n\n### Reproduction\n\nI will provide tomorrow in office\n\n### Describe the bug\n\n```\r\nconst { data, refresh, pending } = useAsyncData(\r\n `taxstatus-${props.rfc}`,\r\n () =>\r\n props.type === \"PM\"\r\n ? getPMTaxStatus(props.rfc, props.password)\r\n : getPFTaxStatus(props.rfc, props.password),\r\n { immediate: false }\r\n);\r\n```\r\nThe pending is always true.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2027,2028],{"name":2003,"color":2004},{"name":2006,"color":2007},19189,"{pending} from useAsyncData always true though set { immediate: false }","2023-02-22T04:35:09Z","https://github.com/nuxt/nuxt/issues/19189",0.6248491,{"description":2035,"labels":2036,"number":2047,"owner":1994,"repository":1994,"state":2009,"title":2048,"updated_at":2049,"url":2050,"score":2051},"### Environment\n\nThis seems to only happens in production environment when using the 'aws-lambda' nitro preset and cloudfront \n\n### Reproduction\n\nI can't provide a minimal reproduction because it only occurs in production behind cloudfront. In development mode, page refresh will refresh the ssrContext payload\n\nHere is an example of how useAsyncData is used https://stackblitz.com/edit/github-gk9dyq?file=pages%2Findex.vue but the error won't occur because this isn't in production behind cloudfront\n\n### Describe the bug\n\nContext: I have a Nuxt app that fetches data from my nitro backend using useAsyncData which sets a key based on the current route path. In production, I'm using the aws-preset to serve nuxt from a lambda which is behind api gateway and cloudfront. I have set cloudfront to disable caching for my api routes.\n\nProblem: In development, if I reload the page, useAsyncData will fetch data from the server and update the ssr context payload as expected. If I'm in production, reloading the page will not trigger useAsyncData and I will always get back the initial request payload. Even if I switch browsers I will still get the same stale payload - so it's being stored on the lambda. So let's say for example my server endpoint returns Math.random() - it will ALWAYS return the original value of the first time that endpoint was hit.\n\nWhy in production does a page refresh not update the payload that's stored in nuxtApp? I know that useAsyncData has a refresh function returned as well as the ability to add watchers but I'm not sure if I can make use of them. The request doesn't change parameters (ex: `/api/content/page-one` will always be `/api/content/page-one` but I want to get fresh data whenever a user refreshes their browser because the backend's response may change from another service.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2037,2038,2041,2044],{"name":2006,"color":2007},{"name":2039,"color":2040},"nitro","bfd4f2",{"name":2042,"color":2043},"needs reproduction","FBCA04",{"name":2045,"color":2046},"closed-by-bot","ededed",29742,"useAsyncData doesn't update ssrContext on page refresh","2024-11-08T01:59:31Z","https://github.com/nuxt/nuxt/issues/29742",0.6254809,{"description":2053,"labels":2054,"number":2062,"owner":1994,"repository":1994,"state":2009,"title":2063,"updated_at":2064,"url":2065,"score":2066},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.16.1\r\n- Nuxt Version: 3.6.1\r\n- Nitro Version: 2.5.2\r\n- Package Manager: yarn@1.22.19\r\n- Builder: vite\r\n- User Config: runtimeConfig, alias, css, components, vite, dir, plugins, modules, pwa\r\n- Runtime Modules: nuxt-jsonld@2.0.8, @vite-pwa/nuxt@0.1.0, @pinia/nuxt@0.4.11, @nuxtjs/eslint-module@4.1.0\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-tex5o8?file=pages%2Findex.vue\r\n\r\n### Describe the bug\r\n\r\nI've checked docs and as I see `useAsyncData` should cache data for response with same key.\r\n\r\nSo for example:\r\n```\r\nconst KEY = 'test';\r\nconst { data: data } = await useAsyncData(KEY, async () => {\r\n console.log('test');\r\n return {};\r\n});\r\nconst { data: data2 } = await useAsyncData(KEY, async () => {\r\n console.log('test');\r\n return {};\r\n});\r\nconst { data: data3 } = await useAsyncData(KEY, async () => {\r\n console.log('test');\r\n return {};\r\n});\r\n```\r\n\r\nThis should show only once `'test'` in console, but it shows it three times.\r\n\r\nIn real world app I need to fetch data in component A and then use same data in page B.\r\nRight now the only option that I see is to make two api calls.\r\n\r\nIn nuxt 2, I've used `fetch` component option method to make call in component A and I didn't even need to make call in page B, because I've already had data in vuex (from component A). How to handle that (without duplicated requests) if `useAsyncData` doesn't provide cache?\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2055,2058,2061],{"name":2056,"color":2057},"documentation","5319e7",{"name":2059,"color":2060},"good first issue","fbca04",{"name":2003,"color":2004},22622,"Clarify that `useAsyncData` results are not cached","2023-12-14T11:09:24Z","https://github.com/nuxt/nuxt/issues/22622",0.629474,{"description":2068,"labels":2069,"number":2073,"owner":1994,"repository":1994,"state":2009,"title":2074,"updated_at":2075,"url":2076,"score":2077},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Darwin\r\n- Node Version: v16.19.0\r\n- Nuxt Version: 3.5.0\r\n- Nitro Version: 2.4.1\r\n- Package Manager: yarn@3.5.0\r\n- Builder: vite\r\n- User Config: app, css, ssr, modules, htmlValidator, runtimeConfig, alias, build, vite\r\n- Runtime Modules: @vueuse/nuxt@10.2.1, @pinia/nuxt@^0.4.10, @nuxtjs/html-validator@^1.2.4, nuxt-swiper@^1.1.0\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/devops3199/nuxt3-issue-example\r\n\r\n### Describe the bug\r\n\r\nThe issue occurs during SSR.\r\n\r\nI'm trying to fetch second data based on a value from the first fetched data. From the below scenario, only the first fetch triggers then render html.\r\n\r\n```\r\n// src/app.vue\r\n\r\n\u003Ctemplate>\r\n code...\r\n\u003C/template>\r\n\u003Cscript setup>\r\nconst {data} = await useAsyncData('items', async () => {\r\n let details;\r\n const {data} = await $fetch(...);\r\n \r\n if (data.isCondition) {\r\n // although isCondition value is true, does not trigger\r\n details = await $fetch(...);\r\n }\r\n \r\n return {data, details};\r\n})\r\n\u003C/script>\r\n```\r\n\r\nI can use `Promise.all` to solve this issue, but I am not sure whether this is the expected behaviour from `useAsyncData`. \r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2070,2071,2072],{"name":2003,"color":2004},{"name":2006,"color":2007},{"name":2042,"color":2043},22263,"Allowing more than a single fetch in useAsyncData","2023-07-23T23:24:25Z","https://github.com/nuxt/nuxt/issues/22263",0.6315046,{"labels":2079,"number":2082,"owner":1994,"repository":1994,"state":2009,"title":2083,"updated_at":2084,"url":2085,"score":2086},[2080,2081],{"name":2003,"color":2004},{"name":1985,"color":1986},12690,"useAsyncData fetching data in both server and client on Reload. ","2023-01-19T16:09:49Z","https://github.com/nuxt/nuxt/issues/12690",0.63207024,{"description":2088,"labels":2089,"number":2092,"owner":1994,"repository":1994,"state":2009,"title":2093,"updated_at":2094,"url":2095,"score":2096},"### Environment\n\n- Operating System: `Linux`\r\n- Node Version: `v16.17.1`\r\n- Nuxt Version: `3.2.2`\r\n- Nitro Version: `2.2.2`\r\n- Package Manager: `npm@8.15.0`\r\n- Builder: `vite`\r\n- User Config: `runtimeConfig`, `modules`, `css`, `app`, `experimental`, `imports`, `nitro`, `typescript`\r\n- Runtime Modules: `@pinia/nuxt@0.4.7`, `@nuxtjs/tailwindcss@6.4.1`\r\n- Build Modules: \n\n### Reproduction\n\n\r\n```\r\n// before refresh call asyncData a pending must be false\r\nconst { pending: isLoadingOne, refresh: fetchOne } = useFetch('https://jsonplaceholder.typicode.com/todos/1', { immediate: false });\r\n\r\n// before refresh call asyncData a pending must be false | perhaps a controversial case\r\nconst { pending: isLoadingTwo, refresh: fetchTwo } = await useFetch('https://jsonplaceholder.typicode.com/todos/2', { immediate: false });\r\n```\r\n\r\nSee full code: https://stackblitz.com/edit/nuxt-starter-9uxzmd?file=app.vue\n\n### Describe the bug\n\nUntil the request is forcibly invoked, it is assumed that the waiting status should be false.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2090,2091],{"name":2003,"color":2004},{"name":2006,"color":2007},19218,"`useFetch/useAsyncData`: BUG: when `immediate: false`, then `pending` is `true` before call `execute/refresh` (must to be false)","2023-12-20T16:49:10Z","https://github.com/nuxt/nuxt/issues/19218",0.6330652,{"labels":2098,"number":2101,"owner":1994,"repository":1994,"state":2009,"title":2102,"updated_at":2103,"url":2104,"score":2105},[2099,2100],{"name":2003,"color":2004},{"name":2006,"color":2007},14279,"Inconsistent useLazyFetch behavior","2023-01-19T17:32:13Z","https://github.com/nuxt/nuxt/issues/14279",0.63325816,["Reactive",2107],{},["Set"],["ShallowReactive",2110],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"lQ2huj32px9L7i0dcg8-0O1gQuAlaczF5RmIaFG4N4M":-1},"/nuxt/nuxt/22027"]