Package org.apache.synapse.transport.netty.util

## Class CacheUtils

- java.lang.Object
- - org.apache.synapse.transport.netty.util.CacheUtils

-     public class CacheUtils
      extends Object

  A utility class for HTTP caching related tasks.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `ETAG_HEADER` |
    `static String` | `IF_MODIFIED_SINCE_HEADER` |
    `static String` | `IF_NONE_MATCH_HEADER` |
    `static String` | `LAST_MODIFIED_HEADER` |
    `static String` | `WEAK_VALIDATOR_TAG` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `isValidCachedResponse​(org.wso2.transport.http.netty.message.HttpCarbonMessage outboundResponse, org.wso2.transport.http.netty.message.HttpCarbonMessage inboundRequest)` | Method for revalidating a cached response.

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

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

- - ### Field Detail

    - #### WEAK_VALIDATOR_TAG

          public static final String WEAK_VALIDATOR_TAG

      See Also:
        Constant Field Values

    - #### ETAG_HEADER

          public static final String ETAG_HEADER

      See Also:
        Constant Field Values

    - #### IF_NONE_MATCH_HEADER

          public static final String IF_NONE_MATCH_HEADER

      See Also:
        Constant Field Values

    - #### IF_MODIFIED_SINCE_HEADER

          public static final String IF_MODIFIED_SINCE_HEADER

      See Also:
        Constant Field Values

    - #### LAST_MODIFIED_HEADER

          public static final String LAST_MODIFIED_HEADER

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### isValidCachedResponse

          public static boolean isValidCachedResponse​(org.wso2.transport.http.netty.message.HttpCarbonMessage outboundResponse,
                                                      org.wso2.transport.http.netty.message.HttpCarbonMessage inboundRequest)

      Method for revalidating a cached response. This method follows the RFC7232 and RFC7234 specifications.
      Parameters:
        `outboundResponse` - The response to be sent to downstream
        `inboundRequest` - The request received from downstream
      Returns:
        Returns true if the cached response is still valid