Re: Question regarding stream wrappers and op code cache
| From: | reeze | Date: | Wed, 04 Feb 2015 03:02:14 +0000 |
| Subject: | Re: Question regarding stream wrappers and op code cache | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81756@lists.php.net to get a copy of this message | ||
Hi Cesar,
On 4 February 2015 at 07:26, Cesar Rodas <cesar@rodas.me> wrote:
> Hi Guys,
>
> I have a doubt, is it efficient include/require files from a source
> different than the "real file system" a stream wrapper class? My
> question is, would the op-code cache work as it would when reading a
> file form the filesystem?
>
Yes it works if you are using 'phar' stream wrapper, the rest wrappers are
not cached,
@see
https://github.com/php/php-src/blob/master/ext/opcache/ZendAccelerator.c#L138-L142
This RFC: https://wiki.php.net/rfc/streams-is-cacheable
is aim to remove
the restriction and allow stream wrapper itself to decide should it been
cached by opcache.
>
> Cheers,
>
> --
> César D. Rodas
> Open Source developer
> +595-983-161124
> PGP: F9ED A265 A3AB C8A1 D145 7368 158A 0336 C707 0AA6
>
>
>