1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-24 05:51:28 +00:00

invalidate local cache when view mode/limit is changed

This commit is contained in:
Andrew Dolgov
2008-02-23 06:44:13 +01:00
parent 93c841c4e5
commit 3c2d7945ae
3 changed files with 16 additions and 5 deletions

View File

@@ -823,7 +823,14 @@ function collapse_feedlist() {
} catch (e) { } catch (e) {
exception_error(e, "toggle_feedlist"); exception_error(e, "toggle_feedlist");
} }
}
function viewModeChanged() {
cache_empty();
return viewCurrentFeed(0, '')
}
function viewLimitChanged() {
cache_empty();
return viewCurrentFeed(0, '')
} }

View File

@@ -178,7 +178,7 @@ window.onload = init;
<?php } ?> <?php } ?>
<?php echo __('View:') ?> <?php echo __('View:') ?>
<select name="view_mode" onchange="viewCurrentFeed(0, '')"> <select name="view_mode" onchange="viewModeChanged()">
<option selected value="adaptive"><?php echo __('Adaptive') ?></option> <option selected value="adaptive"><?php echo __('Adaptive') ?></option>
<option value="all_articles"><?php echo __('All Articles') ?></option> <option value="all_articles"><?php echo __('All Articles') ?></option>
<option value="marked"><?php echo __('Starred') ?></option> <option value="marked"><?php echo __('Starred') ?></option>
@@ -202,7 +202,7 @@ window.onload = init;
} }
print_select_hash("limit", $def_art_limit, $limits, print_select_hash("limit", $def_art_limit, $limits,
'onchange="viewCurrentFeed(0, \'\')"'); 'onchange="viewLimitChanged()"');
?> ?>

View File

@@ -1508,6 +1508,10 @@ function cache_expire() {
} }
} }
function cache_empty() {
article_cache = new Array();
}
function cache_invalidate(id) { function cache_invalidate(id) {
var i = 0 var i = 0