Skip to content

Commit

Permalink
Add "revalidate" time to opcache scripts list
Browse files Browse the repository at this point in the history
Closes GH-11816
  • Loading branch information
mikhainin authored and iluuu1994 committed Aug 3, 2023
1 parent ae431bb commit 958a25e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions UPGRADING
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions ext/opcache/zend_accelerator_module.c
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 958a25e

Please sign in to comment.