Hi,
I just wrote this RFC to propose a clean way for opcode caches to decide if
a given URI is cacheable or not :
https://wiki.php.net/rfc/streams-is-cacheable
Please comment.
Regards
François
+1 for this PR.
Hi,
I just wrote this RFC to propose a clean way for opcode caches to decide if
a given URI is cacheable or not :https://wiki.php.net/rfc/streams-is-cacheable
Please comment.
Regards
François
hi,
Hi,
I just wrote this RFC to propose a clean way for opcode caches to decide if
a given URI is cacheable or not :https://wiki.php.net/rfc/streams-is-cacheable
Please comment.
It looks like a good addtion, thanks :) I am all for it..
Could you add tests please? A must before going any further :)
Please add the changes to UPGRADING.INTERNALS and UPGRADING as well.
Cheers,
Pierre
@pierrejoye | http://www.libgd.org
De : Pierre Joye [mailto:pierre.php@gmail.com]
Could you add tests please? A must before going any further :)
Three tests are included in the patch : one to check that phar uris are cacheable, one to check that plain files and 'file:' uris are cacheable, one to check that 'http' and 'https' uris are not cacheable.
An additional test should be added in the opcache tests dir to check that opcache is caching plain files, phar uris, but not other protocols. It is in my todo list, but I wanted your comments first, as it is more complex to implement.
Please add the changes to UPGRADING.INTERNALS and UPGRADING as well.
Done
Regards
François
I just wrote this RFC to propose a clean way for opcode caches to
decide if a given URI is cacheable or not :https://wiki.php.net/rfc/streams-is-cacheable
Please comment.
I don't see why you need the define if it's always available. Extension
that implement this can just check for #ifdef PHP_VERSION_ID
> 70000.
cheers,
Derick
Hi François,
I just wrote this RFC to propose a clean way for opcode caches to decide if
a given URI is cacheable or not :https://wiki.php.net/rfc/streams-is-cacheable
Please comment.
How would cache invalidation work? Is there already some mechanism to handle that with streams?
Thanks.
Andrea Faulds
http://ajf.me/
De : Andrea Faulds [mailto:ajf@ajf.me]
How would cache invalidation work? Is there already some mechanism to
handle that with streams?
Sorry, I am not sure I understand what you mean with 'cache invalidation'.
Do you mean stat/mtime check to detect file changes ? This mechanism works
the same with stream wrappers through an url_stat() call.
Did you mean to omit the “return” for is_cacheable_stream_path if !PHP_STREAMS_SUPPORT_IS_CACHEABLE?
https://github.com/flaupretre/php-src/commit/d012ba6cb357df9fcb8f6669e3c7103018590b41?diff=unified#diff-f6d4b551c6233faa294ae9a97897c7d4R143 https://github.com/flaupretre/php-src/commit/d012ba6cb357df9fcb8f6669e3c7103018590b41?diff=unified#diff-f6d4b551c6233faa294ae9a97897c7d4R143
De : Andrea Faulds [mailto:ajf@ajf.me]
How would cache invalidation work? Is there already some mechanism to
handle that with streams?Sorry, I am not sure I understand what you mean with 'cache invalidation'.
Do you mean stat/mtime check to detect file changes ? This mechanism works
the same with stream wrappers through an url_stat() call.
De : Martin Amps [mailto:php_m@rtin.so]
Did you mean to omit the return for is_cacheable_stream_path if
!PHP_STREAMS_SUPPORT_IS_CACHEABLE?
Right. Thanks for this one. Actually, conditionals will go away as it is
going to the PHP7 branch only.
Ah gotcha — ok, awesome. Good work!
De : Martin Amps [mailto:php_m@rtin.so]
Did you mean to omit the “return” for is_cacheable_stream_path if
!PHP_STREAMS_SUPPORT_IS_CACHEABLE?Right. Thanks for this one. Actually, conditionals will go away as it is
going to the PHP7 branch only.