Skip to content

Commit

Permalink
Fix clearing cache for new stats server
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Aug 7, 2024
1 parent 1029eaf commit 92e3d2e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions authentic-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1715,8 +1715,12 @@ sub clear_theme_cache
unlink_file("$theme_var_dir/software+latest");

# Clear stats history
opendir(my $dir, $theme_var_dir);
grep {unlink_file("$theme_var_dir/$_") if (/^stats-server-\d+/)} readdir($dir);
closedir($dir);
unlink_file("$theme_var_dir/real-time-monitoring.json");
kill_byname("$current_theme/stats.pl", 9);
unlink_file("$theme_var_dir/stats-$remote_user.json");
kill_byname("$current_theme/stats.cgi", 9);

# Remove cached downloads
unlink_file("$product_var/cache");
Expand Down Expand Up @@ -1804,7 +1808,7 @@ sub clear_theme_cache
my $vm_var_dir = $virtual_server::module_var_directory;
opendir(my $dir, $vm_var_dir);
grep {unlink_file("$vm_var_dir/$_") if (/^virtual\-server\-server\-templates/)} readdir($dir);
closedir $dir;
closedir($dir);

# Clear seen features cache
if ($full) {
Expand All @@ -1819,7 +1823,7 @@ sub clear_theme_cache
# Clear session specific temporary files
opendir(my $dir, $tmp_dir);
grep {unlink_file("$tmp_dir/$_") if (/^\.theme_/ && /$salt/)} readdir($dir);
closedir $dir;
closedir($dir);
}

sub theme_make_config_dir
Expand Down

0 comments on commit 92e3d2e

Please sign in to comment.