rfc:streams-is-cacheable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:streams-is-cacheable [2015/01/04 01:20] francoisrfc:streams-is-cacheable [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== PHP RFC: Add is_cacheable() stream-wrapper operation ====== ====== PHP RFC: Add is_cacheable() stream-wrapper operation ======
-  * Version: 1.0 +  * Version: 1.2 
-  * Date: 2015-01-04 (Happy new year !)+  * Date: 2015-01-04
   * Author: François Laupretre, francois@tekwire.net   * Author: François Laupretre, francois@tekwire.net
-  * Status: In discussion+  * Status: Under discussion
   * First Published at: http://wiki.php.net/rfc/streams-is-cacheable   * First Published at: http://wiki.php.net/rfc/streams-is-cacheable
  
Line 25: Line 25:
 instance, opcache instance, opcache
 is using the second solution : 'file' and 'phar' are explicitely is using the second solution : 'file' and 'phar' are explicitely
-declared as the only 'cacheable' stream wrappers. This is nothing more than +declared as the only 'cacheable' stream wrappers. This is a 
-quick-and-dirty workaround and we now +quick-and-dirty workaround and there is real need for a reliable and generic 
-need a reliable and generic way of determining whether an URI is cacheable.+way of determining whether an URI is cacheable.
  
 What I am proposing : What I am proposing :
Line 56: Line 56:
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
  
-5.7, if released. Otherwise, PHP 7.+PHP 7.
  
 ===== RFC Impact ===== ===== RFC Impact =====
Line 65: Line 65:
 ==== To Existing Extensions ==== ==== To Existing Extensions ====
  
-Phar needs to implement an is_cacheable() function. This function always returns 1.+Phar needs to implement an is_cacheable() function, returning always 1.
  
 The same for the plain files wrapper. The same for the plain files wrapper.
Line 71: Line 71:
 ==== To Opcache ==== ==== To Opcache ====
  
-Opcode caches will implement the following logic :+Opcode caches must implement the following logic :
  
 If the received path is a 'stream' path, call php_stream_is_cacheable(path, 0, NULL). If the received path is a 'stream' path, call php_stream_is_cacheable(path, 0, NULL).
Line 79: Line 79:
 ==== New Constants ==== ==== New Constants ====
  
-The C-level PHP_STREAMS_SUPPORT_IS_CACHEABLE is defined. This allows conditional +None
-code using '#ifdef' stanza.+
  
 ===== Open Issues ===== ===== Open Issues =====
  
-None+Discussion is under way to define how the cache can compute the key 
 +corresponding to a stream-wrapped path.
  
 ===== Unaffected PHP Functionality ===== ===== Unaffected PHP Functionality =====
Line 93: Line 93:
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
  
-2/3 or 50%+1 majority ? Not clear for me :)+Required majority: 50%+1
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
  
-A pull request is available at : +Pull Request: [[https://github.com/php/php-src/pull/976]]
- +
-[[https://github.com/php/php-src/pull/976]]+
  
-This patch includes every modification described in this RFC, including phar and+This PR includes every modification described in this RFC, including phar and
 plain files is_cacheable() handler. It also contains tests. plain files is_cacheable() handler. It also contains tests.
  
-PHP manual changes not written yet.+PHP documentation additions (file_is_cacheable(), streamWrapper::is_cacheable()) 
 +not written yet.
  
 ===== Implementation ===== ===== Implementation =====
rfc/streams-is-cacheable.1420334445.txt.gz · Last modified: 2017/09/22 13:28 (external edit)