rfc:session-gc

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
rfc:session-gc [2014/03/13 03:20] – created yohgakirfc:session-gc [2016/08/31 20:45] – Fix version yohgaki
Line 1: Line 1:
  
-====== PHP RFC: Your Title Here ====== +====== PHP RFC: Add session_gc() ====== 
-  * Version: 0.9+  * Version: 1.0
   * Create Date: 2014-03-13   * Create Date: 2014-03-13
-  * Modify Date: 2014-03-13+  * Modify Date: 2016-08-10
   * Author: Yasuo Ohgaki, yohgaki@ohgaki.net   * Author: Yasuo Ohgaki, yohgaki@ohgaki.net
-  * Status: Draft+  * Status: Voting
   * First Published at: http://wiki.php.net/rfc/session-gc   * First Published at: http://wiki.php.net/rfc/session-gc
  
Line 14: Line 14:
  
 The best way to purge old session data is executing GC periodically. The best way to purge old session data is executing GC periodically.
 +
 +Although timestamp based session management is declined twice, it is mandatory for session management. Please refer to Strict Session RFC for details.
 +
 +  * https://wiki.php.net/rfc/precise_session_management
  
 ===== Proposal ===== ===== Proposal =====
  
-==== Option 1 - Let user call GC ==== 
   * Add session_gc() API.   * Add session_gc() API.
   * Document calling session_gc() periodically is the best practice.   * Document calling session_gc() periodically is the best practice.
  
-==== Option 2 - Change save handler ==== 
-  * Let save handlers to check last GC time. 
-  * If last GC time is over session.expire, then execute GC. 
  
-===== Backward Incompatible Changes =====+  int session_gc(void)
  
-None+It simply executes GC save handler defined.
  
-===== Proposed PHP Version(s) ===== 
  
-PHP 5.x+ +===== Backward Incompatible Changes =====
- +
-===== SAPIs Impacted =====+
  
 None None
  
-===== Impact to Existing Extensions =====+===== Proposed PHP Version(s) =====
  
-  * Option 1 : Session module have new API (session_gc()) +PHP 7.2
-  * Option 2 : Session save handlers including 3rd party modules.+
  
-===== New Constants =====+===== Vote =====
  
-None +This project requires a 2/3 majority
- +Vote starts2016/08/10 Vote ends: 2016/08/17 23:59:59 UTC
-===== php.ini Defaults ===== +
- +
-No INI changes +
- +
-If there are any php.ini settings then list: +
-  * hardcoded default values +
-  * php.ini-development values +
-  * php.ini-production values +
- +
-===== Open Issues ===== +
- +
-None +
- +
-===== Unaffected PHP Functionality ===== +
- +
- +
-===== Future Scope ===== +
- +
-Removing probability based GC. +
- +
-===== Proposed Voting Choices ===== +
- +
-VOTE2014/XX/XX 2014/XX/XX+
  
-<doodle title="Deprecate INI functions" auth="yohgaki" voteType="single" closed="true"> +<doodle title="Add session_gc() function" auth="Yasuo Ohgaki" voteType="single" closed="true"> 
-   Keep current +   Yes 
-   Option 1 (session_gc()) +   No
-   * Option 2 (Modify save handlers)+
 </doodle> </doodle>
  
-State whether this project requires a 2/3 or 50%+1 majority (see [[voting]]) 
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
  
-TBD+  * https://github.com/php/php-src/pull/1852
  
 ===== Implementation ===== ===== Implementation =====
Line 86: Line 57:
 After the project is implemented, this section should contain  After the project is implemented, this section should contain 
   - the version(s) it was merged to   - the version(s) it was merged to
 +    - PHP-7.2 and master branch
   - a link to the git commit(s)   - a link to the git commit(s)
 +    - http://git.php.net/?p=php-src.git;a=commitdiff;h=1cf179e4150308d8217d9517408ca5e22b5d607f
   - a link to the PHP manual entry for the feature   - a link to the PHP manual entry for the feature
 +    - http://svn.php.net/viewvc?view=revision&revision=339955 
  
 ===== References ===== ===== References =====
  
-Links to external references, discussions or RFCs +  * https://bugs.php.net/bug.php?id=11100
- +
-===== Rejected Features ===== +
- +
-Keep this updated with features that were discussed on the mail lists.+
rfc/session-gc.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1