note 124628 added to function.opcache-reset
| From: | Jan@php.net | Date: | Mon, 20 Jan 2020 15:02:00 +0000 |
| Subject: | note 124628 added to function.opcache-reset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-213927@lists.php.net to get a copy of this message | ||
For longer php scripts: opcache_reset() will obtain a lock and it will reset the cache only after
the script has ended, after which the lock is released.
Calling opcache_reset() multiple times or any other opcache manipulation method, like
opcache_invalidate(), after calling opcache_reset() in a single script is not useful: while
opcache_reset() holds the lock, other opcache methods will return false and they will have zero
effect on the cache.
Although the opcache manipulation methods have no effect during this lock, opcache does recache
scripts corresponding to the opcache.revalidate_freq setting, provided that
opcache.validate_timestamps is switched on.
To keep the cache up to date, use opcache_invalidate() when modifying single php files. Use
opcache_reset() for bigger changes and only at the end of a php script.
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.172 (proxied: 79.225.177.231)
----
Manual Page -- http://php.net/manual/en/function.opcache-reset.php
Edit -- https://master.php.net/note/edit/124628
Del: integrated -- https://master.php.net/note/delete/124628/integrated
Del: useless -- https://master.php.net/note/delete/124628/useless
Del: bad code -- https://master.php.net/note/delete/124628/bad+code
Del: spam -- https://master.php.net/note/delete/124628/spam
Del: non-english -- https://master.php.net/note/delete/124628/non-english
Del: in docs -- https://master.php.net/note/delete/124628/in+docs
Del: other reasons-- https://master.php.net/note/delete/124628
Reject -- https://master.php.net/note/reject/124628
Search -- https://master.php.net/manage/user-notes.php