I want to load data from an external REST API and cache it for a specific duration. Which type of data page would I use?

I want to load data from an external REST API and cache it for a specific duration. Which type of data page would I use?

Thank you very much for your help in advance.

@SagarS98

Thread would be ideal as any user can run it any number of times. To cache it for a specific duration, in the load management tab of the data page provide the time you want keep it cache in ‘Reload if older than’ field.

@SohamM95 Thanks

@SagarS98

A data page scope can be node, thread, or requestor:

  • Thread – The page is created in a single requestor thread and can be accessed as often as needed by processing in that thread.
  • Requestor – The requestor can access the page(s) loaded across all threads.
  • Node – Any requestor executing on the current node can access the pages.

Refresh Strategies - Please check the below link and determine the correct refresh strategy based on your requirements (how often the data changes in the backend).

Refresh strategies for Data Pages | Pega Academy.