Skip to content

Commit

Permalink
Fix to purge OS information cache on cache clear
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Aug 10, 2023
1 parent 5665c95 commit 17224f8
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 @@ -1693,15 +1693,19 @@ sub clear_theme_cache
unlink_file("$theme_var_dir/stats-$remote_user.json");
kill_byname("$current_theme/stats.cgi", 9);

# Remove cached downloads
unlink_file("$product_var/cache");

# Remove cached OS info
unlink_file("$product_var/modules/webmin/announce-cache");
unlink_file("$product_var/modules/webmin/oscache");
unlink_file("$product_var/modules/webmin/realos-cache");
}

# Clear user cached collected info
unlink_file("$tmp_dir/combined-system-info-$remote_user");
unlink_file("$home_tmp_dir/combined-system-info-$remote_user");

# Remove cached downloads
unlink_file("$product_var/cache");

# Remove and regenerate OS cache
if (&foreign_available('webmin')) {
&foreign_require("webmin");
Expand Down

0 comments on commit 17224f8

Please sign in to comment.