public class HttpCachingFilter extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isNoStore(org.apache.axis2.context.MessageContext msgCtx)
This method returns whether no-store header exists in the response.
|
static boolean |
isValidCacheEntry(CachableResponse cachedResponse,
org.apache.synapse.MessageContext synCtx)
If the cached response is expired, response needs to be fetched again.
|
static void |
setAgeHeader(CachableResponse cachedResponse,
org.apache.axis2.context.MessageContext msgCtx)
This method sets the Age header.
|
static void |
setResponseCachedTime(Map<String,String> headers,
CachableResponse response)
Set the response fetched time in milliseconds.
|
public static boolean isValidCacheEntry(CachableResponse cachedResponse, org.apache.synapse.MessageContext synCtx)
cachedResponse
- The cached response.synCtx
- The message context.public static void setAgeHeader(CachableResponse cachedResponse, org.apache.axis2.context.MessageContext msgCtx)
cachedResponse
- The cached response to be returned.msgCtx
- The messageContext.public static void setResponseCachedTime(Map<String,String> headers, CachableResponse response) throws ParseException
headers
- Transport headers.response
- Response to be cached.ParseException
- throws exception if exception happen while parsing the date.public static boolean isNoStore(org.apache.axis2.context.MessageContext msgCtx)
msgCtx
- MessageContext with the transport headers.Copyright © 2018 WSO2. All rights reserved.