File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public HttpResponse get(String key) {
4040
4141 // check if response is still valid
4242 public boolean isValid (String requestURL , HttpResponse response ) {
43- if (!response .isExpired ()) {
43+ if (!response .isExpired ()) { // TODO: add command line flag
4444 System .out .println ("SCACHE: response has not expired" );
4545 return true ;
4646 }
@@ -52,7 +52,7 @@ public boolean isValid(String requestURL, HttpResponse response) {
5252
5353 HttpResponse newResponse = request .askServerIfvalid (response .lastModified , response .etag ); // ask severer
5454 if (newResponse == null ) { // if error
55- return true ; // Todo: for debugging
55+ return true ; // use the cached response if new response has an unrecoverable error.
5656 }
5757 // HttpResponse r = new HttpRequest(request, response.lastModified, response.etag).send(); // ask server
5858 if (newResponse .status == 304 ) { // Not modified, so still valid
You can’t perform that action at this time.
0 commit comments