Optimizing performance when retrieving Thing using URL parameter

Hi Everyone,

I had a question about performance when getting a Thing from URL parameters using the unique ID.

After using the “Get data using URL parameter” to retrieve a Thing from the database once, does it make another database call if I use the same expression elsewhere? Or is it stored in the browser so that it is only making the call once?

I have been looking for places to optimize in light of the new pricing model. An alternative I thought of is to load it into a group or custom state on the page once and then reference that everywhere it is used in order to minimize database calls.

Regards,
Ryan

Nope

Or is it stored in the browser so that it is only making the call once?

Yep

You can check this for yourself using your the Network tab of your browser dev tools.

Awesome, thanks for the quick response!

1 Like

Hi Adam,

Do you know if its the same case for API calls? i.e., the same API call with the same parameters, if it is referenced in two different locations on the same page, will it be called twice or only once?

I tried examining this in the network tab of the dev tools in chrome but admit I was having trouble interpreting what I was seeing there.

Thanks!

No, it won’t be (even if you want it to be, which can sometime cause problems).

But the API call data is cached, so the API call won’t be made again (for at least 10 minutes, anyway I think).

Great, thank you for that info - my app uses a lot of API requests so I just wanted to make sure that I wasn’t going to accidentally impact my WU count by sending the same request multiple times unnecessarily.

1 Like