Why is the query not saved in the cache?
export const revalidate = 120;
export const getTodoList = cache(async () => {
console.log("TodoListFetchCalled")
const req = {
headers: {
cookie: headers().get('cookie'),
},
};
const SSR = withSSRContext({req})
const {data} = await SSR.API.graphql({query: listTodos});
return data;
})
export default async function Homepage() {
const data = await getTodoList();
return (
<div className={"flex px-6 py-6 w-full"}>
<TodoList data={data.listTodos.items}/>
</div>
)
}