diff options
author | Andrew Dolgov <[email protected]> | 2009-01-16 15:07:22 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-01-16 15:07:22 +0100 |
commit | ad0056a8b2e0179d14e4fd69a3e2406bd414fc53 (patch) | |
tree | e1f17f7423d4d4d785550c9181959015e403b8c7 | |
parent | 37fb651d382a13d299ab3458ff5193011f58596a (diff) |
reset counters on frontend catchup requests
-rw-r--r-- | backend.php | 2 | ||||
-rw-r--r-- | functions.php | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/backend.php b/backend.php index 109c6e586..125968515 100644 --- a/backend.php +++ b/backend.php @@ -164,6 +164,8 @@ case "catchupAll": db_query($link, "UPDATE ttrss_user_entries SET last_read = NOW(),unread = false WHERE owner_uid = " . $_SESSION["uid"]); + ccache_zero_all($link, $_SESSION["uid"]); + break; case "collapse": diff --git a/functions.php b/functions.php index d659b22e8..e84665999 100644 --- a/functions.php +++ b/functions.php @@ -2243,6 +2243,9 @@ AND owner_uid = ".$_SESSION["uid"]); */ } } + + ccache_update($link, $feed, $_SESSION["uid"], $cat_view); + } else { // tag db_query($link, "BEGIN"); @@ -5992,7 +5995,15 @@ feed_id = '$feed_id' AND owner_uid = '$owner_uid'"); } - function ccache_invalidate($link, $feed_id, $owner_uid, $is_cat = false) { + function ccache_zero_all($link, $owner_uid) { + db_query($link, "UPDATE ttrss_counters_cache SET + value = 0 WHERE owner_uid = '$owner_uid'"); + + db_query($link, "UPDATE ttrss_cat_counters_cache SET + value = 0 WHERE owner_uid = '$owner_uid'"); + } + +/* function ccache_invalidate($link, $feed_id, $owner_uid, $is_cat = false) { if (!$is_cat) { $table = "ttrss_counters_cache"; @@ -6002,7 +6013,7 @@ db_query($link, "DELETE FROM $table WHERE feed_id = '$feed_id' AND owner_uid = '$owner_uid'"); - } + } */ function ccache_find($link, $feed_id, $owner_uid, $is_cat = false) { |