Skip to content

Commit 958a25e

Browse files
Mikhail Galaniniluuu1994
Mikhail Galanin
authored andcommitted
Add "revalidate" time to opcache scripts list
Closes GH-11816
1 parent ae431bb commit 958a25e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

UPGRADING

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ PHP 8.3 UPGRADE NOTES
108108
- CLI
109109
. It is now possible to lint multiple files.
110110

111+
- Opcache
112+
. opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix
113+
timestamp of when the next revalidation of the scripts timestamp is due,
114+
dictated by the opcache.revalidate_freq INI directive.
115+
111116
- Posix
112117
. posix_getrlimit() now takes an optional $res parameter to allow fetching a
113118
single resource limit.

ext/opcache/zend_accelerator_module.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,8 @@ static int accelerator_get_scripts(zval *return_value)
616616
timerclear(&exec_time);
617617
timerclear(&fetch_time);
618618

619+
add_assoc_long(&persistent_script_report, "revalidate", (zend_long)script->dynamic_members.revalidate);
620+
619621
zend_hash_update(Z_ARRVAL_P(return_value), cache_entry->key, &persistent_script_report);
620622
}
621623
}

0 commit comments

Comments
 (0)