Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-97027

Document Library Item dynamic Cache-Control

Details

    Description

      Summary:

      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.

      Feature request:
      Make HTTP Cache-Control dynamic for downloading of Document Library Items.

      Proposal:

      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

       

       file.cache.control.guest.policy value Behavior
      private (default value) Use "Cache-Control: private" for all served files
      public
      • Use "Cache-Control: public, max-age=<%x>" if item has "Guest View" permission at the time of serving, where %x is a configurable value
      • Use "Cache-Control: private" otherwise

       

      • 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.

      Attachments

        Issue Links

          Activity

            People

              pablo.agulla Pablo Agulla
              timea.bihari Tímea Bihari
              Votes:
              22 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Packages

                  Version Package