RequestEntity entity,
RequestOptions options) {
try {
if (options == null) options = getDefaultRequestOptions();
Cache cache = getCache();
CacheDisposition disp =
(useCache(method,options)) ?
cache.getDisposition(uri, options) :
CacheDisposition.TRANSPARENT;
CachedResponse cached_response = cache.get(uri, options);
disp = (!disp.equals(CacheDisposition.TRANSPARENT) &&
mustRevalidate(options, cached_response)) ?
CacheDisposition.STALE :
disp;
switch(disp) {
case FRESH: // CACHE HIT: FRESH