From 5bf1fdd2d7e5def2cc4c58ecd263f04090630b2e Mon Sep 17 00:00:00 2001 From: Yaya Laressa Date: Mon, 5 Jul 2021 15:12:13 +0700 Subject: [PATCH] Fix /admin/config/performance --- system/htmly.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/system/htmly.php b/system/htmly.php index 152097a..240f2d6 100644 --- a/system/htmly.php +++ b/system/htmly.php @@ -1482,6 +1482,17 @@ post('/admin/config/performance', function () { } } save_config($new_config, $new_Keys); + + // Clear cache after setting performance + $files = array(); + $draft = array(); + $files = glob('content/*/blog/*.md', GLOB_NOSORT); + $draft = glob('content/*/draft/*.md', GLOB_NOSORT); + rebuilt_cache('all'); + foreach (glob('cache/page/*.cache', GLOB_NOSORT) as $file) { + unlink($file); + } + $login = site_url() . 'admin/config/performance'; header("location: $login"); } else {