Is it good practice to fetch a collection multiple times on one page to set init values?

I have a form and I want to load initial values in the form on page load.

At the moment I am loading a collection then setting each init value with the value of the property from the collection.

Are multiple API requests made or is WeWeb smart enough to make one request then cache?

I believe weweb only make request if you use a ‘fetch collection’ block in your workflow. Calling a collection should not make any more requests.

image

1 Like

Can we get the official word on this from @aurelie or anyone else from the WeWeb team?

In my case, I am using a Supabase back-end, and I can see multiple requests going out to the same table on a single page.