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

PortletResponse.getCacheControl().getExpirationTime() does not contain the value configured in portlet.xml expiration-cache

    Details

      Description

      Given the following configuration:

      portlet.xml
      <portlet>
            ...
            <expiration-cache>20</expiration-cache>
            ...
      </portlet>
      

      The following Java code should return the integer 20 during request/response processing:

      MyPortlet.java
      public void doView(RenderRequest renderRequest, RenderResponse renderResponse) {
          CacheControl cacheControl = renderResponse.getCacheControl();
          System.out.println("expirationTime=" + cacheControl.getExpirationTime());
      }
      

      However there is a bug such that it returns the integer 0.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 20 weeks, 4 days ago

                Packages

                Version Package
                7.1.0 Beta 1
                7.1.0 Beta 2
                7.1.0 Beta 3
                Master