Add "revalidate" time to opcache scripts list

Closes GH-11816
This commit is contained in:
Mikhail Galanin 2023-07-28 19:01:12 +01:00 committed by Ilija Tovilo
parent ae431bbfeb
commit 958a25e22e
No known key found for this signature in database
GPG Key ID: A4F5D403F118200A
2 changed files with 7 additions and 0 deletions

View File

@ -108,6 +108,11 @@ PHP 8.3 UPGRADE NOTES
- CLI
. It is now possible to lint multiple files.
- Opcache
. opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix
timestamp of when the next revalidation of the scripts timestamp is due,
dictated by the opcache.revalidate_freq INI directive.
- Posix
. posix_getrlimit() now takes an optional $res parameter to allow fetching a
single resource limit.

View File

@ -616,6 +616,8 @@ static int accelerator_get_scripts(zval *return_value)
timerclear(&exec_time);
timerclear(&fetch_time);
add_assoc_long(&persistent_script_report, "revalidate", (zend_long)script->dynamic_members.revalidate);
zend_hash_update(Z_ARRVAL_P(return_value), cache_entry->key, &persistent_script_report);
}
}