req.setRequestUrl(url.toString());
req.put(WaybackConstants.REQUEST_TYPE,
WaybackConstants.REQUEST_CLOSEST_QUERY);
req.put(WaybackConstants.REQUEST_EXACT_DATE,
Timestamp.currentTimestamp().getDateStr());
Timestamp earliest = null;
if(bUseOlder) {
earliest = Timestamp.earliestTimestamp();
} else {
Date d = new Date(System.currentTimeMillis() - maxCacheMS);
earliest = new Timestamp(d);
}
req.put(WaybackConstants.REQUEST_START_DATE,earliest.getDateStr());
// for now, assume all live web requests are only satisfiable by the
// exact host -- no massaging.
req.put(WaybackConstants.REQUEST_EXACT_HOST_ONLY,
WaybackConstants.REQUEST_YES);
return req;