Update index.php

This commit is contained in:
Namhyeon Go 2019-11-15 10:47:41 +09:00 committed by GitHub
parent d05d35c55e
commit c1e0f92b91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,3 +125,15 @@ IF(PHP_DDOS_PROTECTION !== false) {
if(!loadRoute($route, $scope)) {
loadRoute("errors/404", $scope);
}
// flush cache
if(array_key_equals("cache_enabled", $config, 1)) {
$caches = iterate_storage_files("cache");
foreach($caches as $filename) {
remove_storage_file($filename, array(
"storage_type" => "cache"
));
}
}
// EOF