From 17224f8c500f0ad3f4292ee18cc1972fca914519 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Thu, 10 Aug 2023 16:35:12 +0300 Subject: [PATCH] Fix to purge OS information cache on cache clear --- authentic-lib.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/authentic-lib.pl b/authentic-lib.pl index 2bfa6ec17..54a8fa3ff 100644 --- a/authentic-lib.pl +++ b/authentic-lib.pl @@ -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");