Re: [mini-RFC] Disable opcache per script using "declare(cache=0)"
| From: | Dmitry Stogov | Date: | Fri, 23 Nov 2018 12:48:40 +0000 |
| Subject: | Re: [mini-RFC] Disable opcache per script using "declare(cache=0)" | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103482@lists.php.net to get a copy of this message | ||
Hi Nikita,
Especially, the main preload.php, usually should be marked, to disable its caching.
Thanks. Dmitry.
________________________________
From: Nikita Popov <nikita.ppv@gmail.com>
Sent: Friday, November 23, 2018 1:08:53 PM
To: Dmitry Stogov
Cc: PHP internals
Subject: Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)"
On Fri, Nov 23, 2018 at 11:04 AM Dmitry Stogov <dmitry@zend.com<mailto:dmitry@zend.com>> wrote:
Hi internals,
I like to propose an ability to disable opcache caching per script, using declare(cache=0) at start
of PHP file.
The idea was inspired by preloading usage, when some scripts are actually preloading scenarios and
have to be executed, but don't have to be cached.
https://github.com/php/php-src/pull/3678
The change is really small in both syntax and implementation, so I wouldn't like to waste time
going through the full RFC process.
I'm going to commit this into master on Wednesday (November 28), if no objections.
Thanks. Dmitry.
Can you please provide an example where this would be used? Should all scripts involved in
preloading (including the main one) be marked this way? I'm not sure I fully understand the
purpose.
Nikita