Home
Support Forums

Debugging and testing on demand builders

Hi,
How can we verify if an “on-demand-builder” is actually caching the result rather than executing on each request?

Hi there, @steelwool :wave:

Thanks so much for your patience here, and welcome to the Netlify Forums! I am glad you found us.

The best approach would be looking at your function invocation count and site visits. Let’s say you have 100 invocations. You can be sure that your On-demand Builders ran 100 times. However, if your page with On-demand Builders gets 150 page views, then you can infer that the On-demand Builder ran 100 out of 150 times.

Additionally, if you have multiple On-demand Builders as well as serverless functions, you could store the invocation count of your On-demand Builders in a database and compare that value with the page views.

Let us know if this helps!