HTTP response caching

  

Hi all,

We are accessing an external web api from Outsystems.

In HTTP, it is possible to add a "Cache-Control" header or "Expires" header in HTTP responses so that the HTTP client can simply reuse the HTTP response they got before if the response is still considered "fresh" (i.e., not yet expired according to the headers mentioned). 

Upon testing, it seems that this is not the case for Outsystems? We are calling the web api through REST integration but the web api endpoint still gets called.


Does Outsystems support caching of HTTP responses? 


Thanks!

Hi,

You can encapsulate your REST service call in a server action and set that action's Cache in Minutes property.

That will keep the output of that action cached for the duration you set.

Cheers,

João

João Mateus wrote:

Hi,

You can encapsulate your REST service call in a server action and set that action's Cache in Minutes property.

That will keep the output of that action cached for the duration you set.

Cheers,

João

Alright I guess that's the only OOTB way for caching REST calls.

Too bad it means the duration is always fixed, if we decide to change the expiry duration of the response in our web api it means we have to change the duration in Outsystems as well.

Thanks João.