ccache: skip non-numeric feeds (e.g. tags)
This commit is contained in:
parent
307d187c6c
commit
5c432ba490
|
@ -275,12 +275,12 @@
|
||||||
/* Updating a label ccache means recalculating all of the caches
|
/* Updating a label ccache means recalculating all of the caches
|
||||||
* so for performance reasons we don't do that here */
|
* so for performance reasons we don't do that here */
|
||||||
|
|
||||||
if (time() - $_SESSION["viewfeed:ccache_update_stamp"] > 120) {
|
// if (time() - $_SESSION["viewfeed:ccache_update_stamp"] > 120) {
|
||||||
if ($feed >= 0) {
|
if ($feed >= 0) {
|
||||||
ccache_update($link, $feed, $_SESSION["uid"], $cat_view);
|
ccache_update($link, $feed, $_SESSION["uid"], $cat_view);
|
||||||
}
|
}
|
||||||
$_SESSION["viewfeed:ccache_update_stamp"] = time();
|
$_SESSION["viewfeed:ccache_update_stamp"] = time();
|
||||||
}
|
// }
|
||||||
|
|
||||||
set_pref($link, "_DEFAULT_VIEW_MODE", $view_mode);
|
set_pref($link, "_DEFAULT_VIEW_MODE", $view_mode);
|
||||||
set_pref($link, "_DEFAULT_VIEW_LIMIT", $limit);
|
set_pref($link, "_DEFAULT_VIEW_LIMIT", $limit);
|
||||||
|
|
|
@ -5684,6 +5684,8 @@
|
||||||
function ccache_find($link, $feed_id, $owner_uid, $is_cat = false,
|
function ccache_find($link, $feed_id, $owner_uid, $is_cat = false,
|
||||||
$no_update = false) {
|
$no_update = false) {
|
||||||
|
|
||||||
|
if (!is_numeric($feed_id)) return;
|
||||||
|
|
||||||
if (!$is_cat) {
|
if (!$is_cat) {
|
||||||
$table = "ttrss_counters_cache";
|
$table = "ttrss_counters_cache";
|
||||||
} else {
|
} else {
|
||||||
|
@ -5715,6 +5717,8 @@
|
||||||
function ccache_update($link, $feed_id, $owner_uid, $is_cat = false,
|
function ccache_update($link, $feed_id, $owner_uid, $is_cat = false,
|
||||||
$update_pcat = true) {
|
$update_pcat = true) {
|
||||||
|
|
||||||
|
if (!is_numeric($feed_id)) return;
|
||||||
|
|
||||||
$prev_unread = ccache_find($link, $feed_id, $owner_uid, $is_cat, true);
|
$prev_unread = ccache_find($link, $feed_id, $owner_uid, $is_cat, true);
|
||||||
|
|
||||||
/* When updating a label, all we need to do is recalculate feed counters
|
/* When updating a label, all we need to do is recalculate feed counters
|
||||||
|
|
Loading…
Reference in New Issue