This is an old revision of the document!
PHP RFC: Add is_cacheable() stream-wrapper operation
- Version: 0.1
- Date: 2015-01-03 (Happy new year !)
- Author: François Laupretre, francois@tekwire.net
- Status: Draft
- First Published at: http://wiki.php.net/rfc/streams-is-cacheable
Introduction
The RFC proposes a generic way for opcode caches to determine if a given URI is cacheable or not.
Proposal
All the features and examples of the proposal.
To paraphrase Zeev Suraski, explain hows the proposal brings substantial value to be considered for inclusion in one of the world's most popular programming languages.
Remember that the RFC contents should be easily reusable in the PHP Documentation.
Backward Incompatible Changes
None
Proposed PHP Version(s)
5.7, if released. Otherwise, PHP 7.
RFC Impact
To SAPIs
None
To Existing Extensions
Phar needs to implement an is_cacheable() function. This function always returns 1.
To Opcache
Opcode caches will implement the following logic : TODO It is necessary to develop RFC's with opcache in mind, since opcache is a core extension distributed with PHP.
Please explain how you have verified your RFC's compatibility with opcache.
New Constants
Describe any new constants so they can be accurately and comprehensively explained in the PHP documentation.
php.ini Defaults
If there are any php.ini settings then list:
- hardcoded default values
- php.ini-development values
- php.ini-production values
Open Issues
Make sure there are no open issues when the vote starts!
Unaffected PHP Functionality
List existing areas/features of PHP that will not be changed by the RFC.
This helps avoid any ambiguity, shows that you have thought deeply about the RFC's impact, and helps reduces mail list noise.
Future Scope
This sections details areas where the feature might be improved in future, but that are not currently proposed in this RFC.
Proposed Voting Choices
Include these so readers know where you are heading and can discuss the proposed voting options.
State whether this project requires a 2/3 or 50%+1 majority (see voting)
Patches and Tests
Links to any external patches and tests go here.
If there is no patch, make it clear who will create a patch, or whether a volunteer to help with implementation is needed.
Make it clear if the patch is intended to be the final patch, or is just a prototype.
Implementation
After the project is implemented, this section should contain
- the version(s) it was merged to
- a link to the git commit(s)
- a link to the PHP manual entry for the feature
References
Links to external references, discussions or RFCs
Rejected Features
Keep this updated with features that were discussed on the mail lists.