Embed Url TTL. What is it for caching response?

Hello dear community.
I create an embed url using this instructions Embed web apps | Retool Docs

It works, but takes a lot of time for the page initially to load. I want to cache the embedURL for every user. How long does the Embed URL TTL? When does it expire?

1 Like

Hello @Bogdan_Mind,

Unfortunately, we do not support caching of Retool apps.

But there are other options to try to reduce the load time of a Retool app.

For your question on the TTL of Embded URLs, we allow up to 30 days (43200 minutes) as an argument for sessionDuration in the embed API. Docs linked.

The response from api/embed-url/external-user is one-time use and will fail on subsequent load attempts. The bottleneck is not that endpoint, it normally returns in well under a second. The longest time in loading is initializing the retool app environment, and caching any part of our response isn't going to help them there.

If you are running queries on page load, you can use query caching to store the results of commonly used queries, check out our docs on that here! If you notice any queries in particular are going slower than expected, check out our docs on query performance to learn more about improving this!