// check cache-control, no-cache, must-revalidate, max-age,
// Date & Expires, expiry in past
// for 1.0 check pragma for no-cache
// add a warning to docs about not a full http 1.1 impl.
ChannelCacheKey k = new ChannelCacheKey();
StringBuffer sbKey = new StringBuffer(1024);
// Only INSTANCE scope is currently supported.
k.setKeyScope(ChannelCacheKey.INSTANCE_KEY_SCOPE);
sbKey.append("sslUri:").append(state.sslUri).append(", ");
// xslUri may either be specified as a parameter to this channel
// or we will get it by looking in the stylesheet list file
String xslUriForKey = state.xslUri;
try {
if (xslUriForKey == null) {
String sslUri = ResourceLoader.getResourceAsURLString(this.getClass(), state.sslUri);
xslUriForKey = XSLT.getStylesheetURI(sslUri, state.runtimeData.getBrowserInfo());
}
} catch (Exception e) {
xslUriForKey = "Not attainable: " + e;
}
sbKey.append("xslUri:").append(xslUriForKey).append(", ");
sbKey.append("key:").append(state.key).append(", ");
sbKey.append("passThrough:").append(state.passThrough).append(", ");
sbKey.append("tidy:").append(state.tidy).append(", ");
sbKey.append("person:").append(state.person);
k.setKey(sbKey.toString());
k.setKeyValidity(new Long(System.currentTimeMillis()));
//log.debug("CWebProxy:generateKey("
// + uid + ") : cachekey=\"" + sbKey.toString() + "\"");
return k;
}