diff --git a/src/General/Get.coffee b/src/General/Get.coffee index 404249f77..c11930c98 100755 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -117,6 +117,13 @@ Get = break if post.no is postID # we found it! if post.no isnt postID + # Cached requests can be stale and must be rechecked. + if req.cached + api = "//a.4cdn.org/#{boardID}/thread/#{threadID}.json" + $.cleanCache (url) -> url is api + $.cache api, -> + Get.fetchedPost @, boardID, threadID, postID, root, context + return # The post can be deleted by the time we check a quote. unless Get.archivedPost boardID, postID, root, context $.addClass root, 'warning' diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index 5f4527a1c..1cac2199f 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -89,6 +89,7 @@ do -> $.on req, 'load', (e) -> cb.call @, e for cb in @callbacks @evt = e + @cached = true delete @callbacks $.on req, 'abort error', rm req.callbacks = [cb]