From: Andrew Dolgov Date: Sat, 23 Feb 2008 05:44:13 +0000 (+0100) Subject: invalidate local cache when view mode/limit is changed X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3c2d7945ae04e219eaa6206c745e314b1492e574;p=tt-rss.git invalidate local cache when view mode/limit is changed --- diff --git a/tt-rss.js b/tt-rss.js index a4588c34..b7a6fca1 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -823,7 +823,14 @@ function collapse_feedlist() { } catch (e) { exception_error(e, "toggle_feedlist"); } +} +function viewModeChanged() { + cache_empty(); + return viewCurrentFeed(0, '') +} - +function viewLimitChanged() { + cache_empty(); + return viewCurrentFeed(0, '') } diff --git a/tt-rss.php b/tt-rss.php index 4ad0a09b..e491cc71 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -178,7 +178,7 @@ window.onload = init; - @@ -202,7 +202,7 @@ window.onload = init; } print_select_hash("limit", $def_art_limit, $limits, - 'onchange="viewCurrentFeed(0, \'\')"'); + 'onchange="viewLimitChanged()"'); ?> diff --git a/viewfeed.js b/viewfeed.js index 2eef820e..79dbe003 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1508,6 +1508,10 @@ function cache_expire() { } } +function cache_empty() { + article_cache = new Array(); +} + function cache_invalidate(id) { var i = 0