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

          Activity

            People

            • Assignee:
              adolfo.perez Adolfo Pérez
              Reporter:
              timea.bihari Tímea Bihari
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Packages

                Version Package