Uploaded image for project: '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;
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: