Re: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-05 Thread Martin Amps
Ah gotcha — ok, awesome. Good work! > On Jan 4, 2015, at 8:09 PM, François Laupretre wrote: > >> De : Martin Amps [mailto:ph...@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, condit

RE: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-04 Thread François Laupretre
> De : Martin Amps [mailto:ph...@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. -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-04 Thread Martin Amps
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

RE: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-04 Thread François Laupretre
> De : Andrea Faulds [mailto:a...@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 sa

Re: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-04 Thread Andrea Faulds
Hi François, > On 4 Jan 2015, at 01:36, François Laupretre wrote: > > 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 the

RE: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-04 Thread François Laupretre
> De : Pierre Joye [mailto:pierre@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'

Re: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-04 Thread Derick Rethans
On Sun, 4 Jan 2015, François Laupretre wrote: > 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. Ex

Re: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-03 Thread Pierre Joye
hi, On Sat, Jan 3, 2015 at 5:36 PM, François Laupretre wrote: > 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

Re: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-03 Thread reeze
+1 for this PR. On 4 January 2015 at 09:36, François Laupretre wrote: > 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 > > > > -