I misunderstood: we're not caching the result with lastmodified.

This commit is contained in:
Zixaphir 2014-01-16 04:31:27 -07:00
parent 3b7aa9f398
commit d34284a8d0
3 changed files with 9 additions and 9 deletions

View File

@ -2554,7 +2554,7 @@
onabort: onload, onabort: onload,
onloadend: onload onloadend: onload
}, { }, {
whenModified: true whenModified: Index.board === ("" + g.BOARD)
}); });
return $.addClass(Index.button, 'fa-spin'); return $.addClass(Index.button, 'fa-spin');
}, },
@ -2585,9 +2585,9 @@
return; return;
} }
Navigate.title(); Navigate.title();
Index.board = "" + g.BOARD;
try { try {
if (req.status === 200 || Index.board !== ("" + g.BOARD)) { if (req.status === 200) {
Index.board = "" + g.BOARD;
Index.parse(JSON.parse(req.response), pageNum); Index.parse(JSON.parse(req.response), pageNum);
} else if (req.status === 304 && (pageNum != null)) { } else if (req.status === 304 && (pageNum != null)) {
Index.pageNav(pageNum); Index.pageNav(pageNum);

View File

@ -2564,7 +2564,7 @@
onabort: onload, onabort: onload,
onloadend: onload onloadend: onload
}, { }, {
whenModified: true whenModified: Index.board === ("" + g.BOARD)
}); });
return $.addClass(Index.button, 'fa-spin'); return $.addClass(Index.button, 'fa-spin');
}, },
@ -2595,9 +2595,9 @@
return; return;
} }
Navigate.title(); Navigate.title();
Index.board = "" + g.BOARD;
try { try {
if (req.status === 200 || Index.board !== ("" + g.BOARD)) { if (req.status === 200) {
Index.board = "" + g.BOARD;
Index.parse(JSON.parse(req.response), pageNum); Index.parse(JSON.parse(req.response), pageNum);
} else if (req.status === 304 && (pageNum != null)) { } else if (req.status === 304 && (pageNum != null)) {
Index.pageNav(pageNum); Index.pageNav(pageNum);

View File

@ -247,7 +247,7 @@ Index =
onabort: onload onabort: onload
onloadend: onload onloadend: onload
, ,
whenModified: true whenModified: Index.board is "#{g.BOARD}"
$.addClass Index.button, 'fa-spin' $.addClass Index.button, 'fa-spin'
load: (e, pageNum) -> load: (e, pageNum) ->
@ -274,10 +274,10 @@ Index =
return return
Navigate.title() Navigate.title()
Index.board = "#{g.BOARD}"
try try
if req.status is 200 or Index.board isnt "#{g.BOARD}" if req.status is 200
Index.board = "#{g.BOARD}"
Index.parse JSON.parse(req.response), pageNum Index.parse JSON.parse(req.response), pageNum
else if req.status is 304 and pageNum? else if req.status is 304 and pageNum?
Index.pageNav pageNum Index.pageNav pageNum