$topmost_article_ids = $ret[0];
$headlines_count = $ret[1];
$returned_feed = $ret[2];
+ $disable_cache = $ret[3];
print "]]></headlines>";
$headlines_unread = getFeedUnread($link, $returned_feed);
print "<headlines-unread value=\"$headlines_unread\"/>";
+ printf("<disable-cache value=\"%d\"/>", $disable_cache);
if ($_GET["debug"]) $timing_info = print_checkpoint("10", $timing_info);
// if (!offset) page_offset = 0;
+ var force_nocache = false;
+
var page_offset = 0;
if (offset > 0) {
var toolbar_query = Form.serialize("main_toolbar_form");
if (toolbar_form.query) {
+ if (toolbar_form.query.value != "") {
+ force_nocache = true;
+ }
toolbar_form.query.value = "";
}
var search_query = Form.serialize("search_form");
query = query + "&" + search_query;
closeInfoBox(true);
+ force_nocache = true;
}
// debug("IS_CAT_STORED: " + activeFeedIsCat() + ", IS_CAT: " + is_cat);
var unread_ctr = document.getElementById("FEEDU-" + feed);
var cache_check = false;
- if (unread_ctr && !page_offset) {
+ if (unread_ctr && !page_offset && !force_nocache) {
unread_ctr = unread_ctr.innerHTML;
var cache_prefix = "";
function outputHeadlinesList($link, $feed, $subop, $view_mode, $limit, $cat_view,
$next_unread_feed, $offset) {
+ $disable_cache = false;
+
$timing_info = getmicrotime();
$topmost_article_ids = array();
/// START /////////////////////////////////////////////////////////////////////////////////
$search = db_escape_string($_GET["query"]);
+
+ if ($search) {
+ $disable_cache = true;
+ }
+
$search_mode = db_escape_string($_GET["search_mode"]);
$match_on = db_escape_string($_GET["match_on"]);
print "</div>";
}
- return array($topmost_article_ids, $headlines_count, $feed);
+ return array($topmost_article_ids, $headlines_count, $feed, $disable_cache);
}
// from here: http://www.roscripts.com/Create_tag_cloud-71.html
var headlines = transport.responseXML.getElementsByTagName("headlines")[0];
var headlines_count_obj = transport.responseXML.getElementsByTagName("headlines-count")[0];
var headlines_unread_obj = transport.responseXML.getElementsByTagName("headlines-unread")[0];
+ var disable_cache_obj = transport.responseXML.getElementsByTagName("disable-cache")[0];
var headlines_count = headlines_count_obj.getAttribute("value");
var headlines_unread = headlines_unread_obj.getAttribute("value");
+ var disable_cache = disable_cache_obj.getAttribute("value") != "0";
if (headlines_count == 0) _infscroll_disable = 1;
cache_invalidate(cache_prefix + active_feed_id);
- cache_inject(cache_prefix + active_feed_id,
- headlines.firstChild.nodeValue, headlines_unread);
+ if (!disable_cache) {
+ cache_inject(cache_prefix + active_feed_id,
+ headlines.firstChild.nodeValue, headlines_unread);
+ }
} else {
debug("headlines_callback: returned no data");