13.7.1 Caching a GET Operation's Response
To improve performance and reduce unnecessary HTTP calls, you can enable
server-side caching for selected REST Data Source GET
operations.
This lets your application reuse previously retrieved results instead of re-fetching them from the remote service. Caching options let you control whether results are shared across all users, stored per user, or scoped just to a specific session. You can also configure when cached content becomes invalid using a simple duration in minutes or a more advanced DBMS_SCHEDULER calendaring expression. For example, you might cache responses until the top of the hour or midnight, or keep them for 15 minutes. Setting the invalidation to 0 means the data is cached only during the current page execution. That can be useful if multiple regions on the same page use the same REST Data Source. APEX manages this caching entirely on the server, so it does not rely on the browser's cache.
Tip:
If your application changes remote data that affects a cached REST Data Source, you can call the PURGE_REST_SOURCE_CACHE() procedure in the APEX_EXEC package. This invalidates the cache for a selected REST Data Source. Consider invoking it as part of the processing where your app modifies the remote data.
Parent topic: Additional REST Data Source Features