Fix caching issue on admin page

This commit is contained in:
2026-01-13 08:36:48 +01:00
parent c1ae169335
commit 77fcae3450

View File

@@ -203,6 +203,12 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
$ok = @file_put_contents($file, $content, LOCK_EX) !== false;
}
// Ensure the updated conf/local.php is picked up immediately even when
// OPcache is configured to revalidate infrequently (e.g. revalidate_freq=60).
if ($ok && function_exists('opcache_invalidate')) {
@opcache_invalidate($file, true);
}
// Best-effort cleanup: stop creating/using legacy conf/plugins/luxtools.local.php
$legacy = DOKU_CONF . 'plugins/' . $plugin . '.local.php';
if (@is_file($legacy)) {