org.apache.synapse.transport.netty.util

## Class CacheUtils

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

-     public class CacheUtils
      extends java.lang.Object

  A utility class for HTTP caching related tasks.

- - ### Field Summary

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

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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 java.lang.String WEAK_VALIDATOR_TAG

      See Also:
        Constant Field Values

    - #### ETAG_HEADER

          public static final java.lang.String ETAG_HEADER

      See Also:
        Constant Field Values

    - #### IF_NONE_MATCH_HEADER

          public static final java.lang.String IF_NONE_MATCH_HEADER

      See Also:
        Constant Field Values

    - #### IF_MODIFIED_SINCE_HEADER

          public static final java.lang.String IF_MODIFIED_SINCE_HEADER

      See Also:
        Constant Field Values

    - #### LAST_MODIFIED_HEADER

          public static final java.lang.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

Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.