Skip to content

Commit ff1e950

Browse files
Display the current opcache.revalidate_freq setting under PHP details (#452)
* add opcache.revalidate_freq access to backend Signed-off-by: Josh Richards <josh.t.richards@gmail.com> * add opcache.revalidate_freq access to the frontend Signed-off-by: Josh Richards <josh.t.richards@gmail.com> --------- Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
1 parent efe466a commit ff1e950

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/PhpStatistics.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function getPhpStatistics(): array {
4545
'memory_limit' => $this->phpIni->getBytes('memory_limit'),
4646
'max_execution_time' => $this->phpIni->getNumeric('max_execution_time'),
4747
'upload_max_filesize' => $this->phpIni->getBytes('upload_max_filesize'),
48+
'opcache_revalidate_freq' => $this->phpIni->getNumeric('opcache.revalidate_freq'),
49+
// NOTE: If access to add'l OPcache *config* parameters is desired consider
50+
// implementing a getOPcacheConfig() wrapper for PHP's opcache_get_configuration()
51+
// like we do for PHP's opcache_get_status() already below
4852
'opcache' => $this->getOPcacheStatus(),
4953
'apcu' => $this->getAPCuStatus(),
5054
'extensions' => $this->getLoadedPhpExtensions(),

templates/settings-admin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ function FormatMegabytes(int $byte): string {
356356
<p>
357357
<?php p($l->t('Upload max size:')); ?>
358358
<em id="phpUploadMaxSize"><?php p($_['php']['upload_max_filesize']); ?></em>
359+
</p>
360+
<p>
361+
<?php p($l->t('OPcache Revalidate Frequency:')); ?>
362+
<em id="phpOpcacheRevalidateFreq"><?php p($_['php']['opcache_revalidate_freq']); ?></em>
359363
</p>
360364
<p>
361365
<?php p($l->t('Extensions:')); ?>

0 commit comments

Comments
 (0)