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

            shuyang.zhou Shuyang Zhou
            neil.griffin Neil Griffin
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 27 weeks, 1 day ago

              Packages

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