Skip to main content

Improving Performance

Improve API performance with caching.

RAW supports caching of execution results. This allows results to be served faster but also helps alleviate load on the source systems where data is read from.

Caching should be used when it is acceptable from a business logic standpoint to serve slightly older results rather than systematically executing the code and reading the freshest data.

To cache results you must set the desired cache expiration in the "Query Result Expiration" under the "Settings" tab when deploying an endpoint.

For instance, you can deploy the following ISS Location endpoint, which tells you the current location of the International Space Station. After deploying it, remember to set the cache duration to 600 seconds. You will then see that the results will be computed during the first invocation and then reused for 10 minutes, after which they will be recomputed once more when requested.

info

If you want to try this example, you can deploy the following endpoint, but remember to set the "Query Result Expiration" as discussed above:

ISS location
Obtain the current location of the International Space Station by joining two web services.

Usage:

/iss