1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-27 21:37:12 +00:00

scrap counter cache system; rework counters to sum() booleans instead

This commit is contained in:
Andrew Dolgov
2020-01-24 14:25:31 +03:00
parent a6d314b753
commit 6080cca9ca
8 changed files with 170 additions and 502 deletions

View File

@@ -731,24 +731,7 @@
if ($_SESSION["uid"]) {
startup_gettext();
load_user_plugins($_SESSION["uid"]);
/* cleanup ccache */
$sth = $pdo->prepare("DELETE FROM ttrss_counters_cache WHERE owner_uid = ?
AND
(SELECT COUNT(id) FROM ttrss_feeds WHERE
ttrss_feeds.id = feed_id) = 0");
$sth->execute([$_SESSION['uid']]);
$sth = $pdo->prepare("DELETE FROM ttrss_cat_counters_cache WHERE owner_uid = ?
AND
(SELECT COUNT(id) FROM ttrss_feed_categories WHERE
ttrss_feed_categories.id = feed_id) = 0");
$sth->execute([$_SESSION['uid']]);
}
}
}