org.apache.tapestry5.internal.services.assets

## Class SRSCompressedCachingInterceptor

- java.lang.Object
- - org.apache.tapestry5.internal.services.assets.DelegatingSRS
  - - org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor
    - - org.apache.tapestry5.internal.services.assets.SRSCompressedCachingInterceptor

- All Implemented Interfaces:
    StreamableResourceSource

      public class SRSCompressedCachingInterceptor
      extends SRSCachingInterceptor

  Specialization of `SRSCachingInterceptor` that only attempts to cache compressed resources.

- - ### Field Summary

    - ### Fields inherited from class org.apache.tapestry5.internal.services.assets.DelegatingSRS

      `delegate`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SRSCompressedCachingInterceptor(StreamableResourceSource delegate, ResourceChangeTracker tracker)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `enableCache(StreamableResourceProcessing processing)` Returns true just when the processing enables compression.
    `protected boolean` | `isCacheable(StreamableResource resource)` Return true only if the resource is compressed.

    - ### Methods inherited from class org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor

      `getStreamableResource`

    - ### Methods inherited from class org.apache.tapestry5.internal.services.assets.DelegatingSRS

      `fileExtensionsForContentType`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SRSCompressedCachingInterceptor

          public SRSCompressedCachingInterceptor(StreamableResourceSource delegate,
                                                 ResourceChangeTracker tracker)

  - ### Method Detail

    - #### isCacheable

          protected boolean isCacheable(StreamableResource resource)

      Return true only if the resource is compressed.
      Overrides:
        `isCacheable` in class `SRSCachingInterceptor`
      Returns:
        true to cache the resource

    - #### enableCache

          protected boolean enableCache(StreamableResourceProcessing processing)

      Returns true just when the processing enables compression.
      Overrides:
        `enableCache` in class `SRSCachingInterceptor`

5.6.0 - Copyright © 2003-2020 The Apache Software Foundation.