Resolution: Already in the Product
DXP explicitly marks document library items as "private" by using "Cache-Control: private" header in HTTP response, which has been introduced by -
LPS-27419- in 6.1 as a design decision, and has been intended behavior since then.
This behavior causes to ignore caching mechanism of web servers and Content Delivery Network tools in front of Liferay.
Make HTTP Cache-Control dynamic for downloading of Document Library Items.
The following is provided only to illustrate expected behavior.
- Add a configuration property file.cache.control.guest.policy to regulate "cache-control" header when serving files, as follows
|private (default value)||Use "Cache-Control: private" for all served files|
- Add a configuration property file.cache.control.guest.max-age to specify how long document have to be considered fresh by caching agents, in seconds. That should default to some reasonable value such as 60
- Tag always-public files and have a servlet filter to set appropriate headers.
- is related to
LPS-109977 Make public documents cacheable by CDN