Tapestry 5
  1. Tapestry 5
  2. TAP5-1717

Assets get cache expiry header of year 1979 in production mode

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.4
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Both ContextAssetRequestHandler and StackAssetRequestHandler do not set
      lastModified date correctly in production mode. They are set to zero,
      which when returned in the browser, the expire header is set to 1979,
      which leads to no assets being cached whatsoever, leading to poor performance.
      This is with yuicompressor enabled.

        Activity

        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #602 (See https://builds.apache.org/job/tapestry-trunk-freestyle/602/)
        TAP5-1717: Assets get cache expiry header of year 1979 in production mode

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188195
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ResourceChangeTrackerImpl.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #602 (See https://builds.apache.org/job/tapestry-trunk-freestyle/602/ ) TAP5-1717 : Assets get cache expiry header of year 1979 in production mode hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188195 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ResourceChangeTrackerImpl.java
        Hide
        Lenny Primak added a comment -

        I traced this down to ResourceChangeTrackerImpl,java line 54...

        trackResource always returns timestamp of zero in production mode...

        -----------
        public long trackResource(Resource resource)
        {
        if (tracker == null)

        { return 0; }

        return tracker.add(resource.toURL());
        }

        Show
        Lenny Primak added a comment - I traced this down to ResourceChangeTrackerImpl,java line 54... trackResource always returns timestamp of zero in production mode... ----------- public long trackResource(Resource resource) { if (tracker == null) { return 0; } return tracker.add(resource.toURL()); }

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Lenny Primak
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development