Prefer cron.php to update grouplist instead of when a client clicks on it.

This commit is contained in:
Retro_Guy 2024-11-27 02:52:28 -07:00
parent da8c476634
commit 3743a38b47
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ if (isset($_REQUEST['groupsearch'])) {
echo '<div class="grouplist_header_title">List of Available Newsgroups:</div>';
// Use cache if new enough
if (filemtime($grouplist_cache_filename) > (time() - 3600)) {
if (filemtime($grouplist_cache_filename) > (time() - 15000)) {
// Allow refresh from cron.php
if (isset($argv[1]) && $argv[1] == '.RELOAD') {
// Do not use cache, instead rebuild grouplist

View File

@ -180,7 +180,7 @@ if (file_exists($config_dir . '/cache.inc.php')) {
exec($CONFIG['php_exec'] . " " . $config_dir . "/scripts/rss-feeds.php");
echo "RSS Feeds updated\n";
# Reload grouplist
if ((filemtime($grouplist_cache_filename) < (time() - 3600) || ! file_exists($grouplist_cache_filename))) {
if ((filemtime($grouplist_cache_filename) < (time() - 14400) || ! file_exists($grouplist_cache_filename))) {
exec($CONFIG['php_exec'] . " ../common/grouplist.php .RELOAD");
echo "Refreshed grouplist\n";
}