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

    XMLWordPrintableJSON

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

            hlship Howard Lewis Ship
            dmitrygusev Dmitry Gusev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: