Tapestry 5
  1. Tapestry 5
  2. TAP5-1868

SRSCachingInterceptor returns compressed version of asset for all clients once it was compressed for some client

    Details

      Description

      Cache lookup ignores StreamableResourceProcessing argument.

      public class SRSCachingInterceptor implements StreamableResourceSource, InvalidationListener
      {
      ...

      public StreamableResource getStreamableResource(Resource baseResource, StreamableResourceProcessing processing, ResourceDependencies dependencies)
      throws IOException
      {
      if (processing == StreamableResourceProcessing.FOR_AGGREGATION)

      { return delegate.getStreamableResource(baseResource, processing, dependencies); }

      StreamableResource result = TapestryInternalUtils.getAndDeref(cache, baseResource);

      if (result == null)
      {
      result = delegate.getStreamableResource(baseResource, processing, dependencies);

      if (isCacheable(result))

      { dependencies.addDependency(baseResource); cache.put(baseResource, new SoftReference<StreamableResource>(result)); }

      }

      return result;
      }

        Activity

        Dmitry Gusev created issue -
        Dmitry Gusev made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Hide
        Howard M. Lewis Ship added a comment -

        I believe the same logic is causing the headache of changing an asset source (such as a JavaScript library) and not seeing the change in the browser, as the cached gzip version is still sent back to the browser.

        Show
        Howard M. Lewis Ship added a comment - I believe the same logic is causing the headache of changing an asset source (such as a JavaScript library) and not seeing the change in the browser, as the cached gzip version is still sent back to the browser.
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Priority Minor [ 4 ] Major [ 3 ]
        Howard M. Lewis Ship made changes -
        Labels fixed-in-5.4-js-rewrite
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.3.5 [ 12322440 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.3.6 [ 12322961 ]
        Fix Version/s 5.3.5 [ 12322440 ]
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.3.5 [ 12322440 ]
        Fix Version/s 5.3.6 [ 12322961 ]
        Howard M. Lewis Ship made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 5.4 [ 12316401 ]
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #977 (See https://builds.apache.org/job/tapestry-trunk-freestyle/977/)
        TAP5-1868: Fix the caching rules so that compressed resources are not sent to clients that don't support compression (Revision 3679e3edb891b51e1242e0842063b9517027eeee)
        Mark TAP5-1868 as fixed (Revision d6fa00a99b3b2f3cfce94ffbfe80cc3854d5cc09)

        Result = FAILURE
        hlship :
        Files :

        • tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/SRSCachingInterceptor.java
        • tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/SRSCompressedCachingInterceptor.java

        hlship :
        Files :

        • 54_RELEASE_NOTES.txt
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #977 (See https://builds.apache.org/job/tapestry-trunk-freestyle/977/ ) TAP5-1868 : Fix the caching rules so that compressed resources are not sent to clients that don't support compression (Revision 3679e3edb891b51e1242e0842063b9517027eeee) Mark TAP5-1868 as fixed (Revision d6fa00a99b3b2f3cfce94ffbfe80cc3854d5cc09) Result = FAILURE hlship : Files : tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/SRSCachingInterceptor.java tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/SRSCompressedCachingInterceptor.java hlship : Files : 54_RELEASE_NOTES.txt
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        150d 13h 8m 1 Howard M. Lewis Ship 06/Aug/12 23:51
        Closed Closed Reopened Reopened
        2m 24s 1 Howard M. Lewis Ship 06/Aug/12 23:53
        Reopened Reopened Closed Closed
        131d 2h 36m 1 Howard M. Lewis Ship 16/Dec/12 01:30

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development