Cache-control header on java cloud installation

Cache-control header on java cloud installation

  

Hi,

  Does anyone know how to use the Factory Configuration application (available on the Forge) to set 'Cache-control' headers. 

As we are on the JAVA stack (in the cloud) we cannot use the built in 'cache in minutes' option, unfortunately.


Thanks

What Factory Configuration does is allow you to edit the web.xml file which is deployed with the application on the application server.

As far as I know there is no way in web.xml to define a header for specific pages.

You can set headers in your application using the HTTPRequestHandler.AddHeader action on the relevant request. Have you tried this approach?

Also, the OutSystems Platform already has default cache options for static content. What kind of content are you trying to define a cache-control header on? This might help with identifying alternative solutions to your problem.

Hi Ricardo, thank you for your response.

I have tried the AddHeader action and it works perfectly. The action gives me exactly what I needed, 

Such a straightforward solution and I am annoyed I didn't think of it myself, However, If there is an option to do it through Lifetime or a Factory Configuration app then it would provide a more flexible solution using configuration as opposed to code changes.