I have an ExpressJS app which contacts a remote API and passes the results to a Handlebars template. That works nicely but the API is contacted every time the page is displayed, which is quite unnecessary.
For example: imagine the API returns user data (address, phone number etc). Once it has been retrieved and displayed, I should not need to hit the API again next time the user navigates to the same page.
Is there a way to check if the data has been previously retrieved from the API and have the template use a local copy, say, retrieved from a sessionStorage?