diff options
author | Andrew Dolgov <[email protected]> | 2009-03-11 16:22:32 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-03-11 16:22:32 +0300 |
commit | f6fed1b26bf60bf508aa186503566df0b64aac92 (patch) | |
tree | 0b09b4d10bfe7a3834f2aba2ecd093e7547c129e /functions.php | |
parent | dee887d10226535827bd0d5a395cbdaf44cc29af (diff) |
ccache: remove obsolete data on feed/category removal
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/functions.php b/functions.php index ee1e8fbe8..4c867f26c 100644 --- a/functions.php +++ b/functions.php @@ -5754,6 +5754,19 @@ value = 0 WHERE owner_uid = '$owner_uid'"); } + function ccache_remove($link, $feed_id, $owner_uid, $is_cat = false) { + + if (!$is_cat) { + $table = "ttrss_counters_cache"; + } else { + $table = "ttrss_cat_counters_cache"; + } + + db_query($link, "DELETE FROM $table WHERE + feed_id = '$feed_id' AND owner_uid = '$owner_uid'"); + + } + function ccache_update_all($link, $owner_uid) { if (get_pref($link, 'ENABLE_FEED_CATS', $owner_uid)) { |