mirror of
https://github.com/php/php-src.git
synced 2024-11-27 03:44:07 +08:00
Update UPGRADING.INTERNALS Session section
This commit is contained in:
parent
dbb1298fdb
commit
6230493005
@ -214,12 +214,20 @@ PHP 7.0 INTERNALS UPGRADE NOTES
|
||||
|
||||
- PS_MOD_UPDATE_TIMESTAMP() session save handler definition is added. New
|
||||
save handler should use PS_MOD_UPDATE_TIMESTAMP() definition. Save handler
|
||||
must not refer/change PS() variables directly from save handler.
|
||||
- PS_MOD_UPDATE_TIMESTAMP() defines validate_sid() handler. This handler
|
||||
must validate if requested session ID is in session data storage or not.
|
||||
Internal save handler needed to asscess PS(id) directly to validate it.
|
||||
Do not access PS(id), but use this handler.
|
||||
- PS_MOD_UPDATE_TIMESTAMP() defines update_timestamp() handlers. This handler
|
||||
must not refer/change PS() variables directly from save handler. Use
|
||||
parameters.
|
||||
- PS_MOD()/PS_MOD_SID() macro exist only for transition. Beware these
|
||||
save handlers are less secure and slower than PS_MOD_UPDATE_TIMESTAMP().
|
||||
- PS(invalid_session_id) was removed. It was never worked as it supposed.
|
||||
To report invalid session ID, use PS_VALIDATE_SID() handler.
|
||||
- PS_VALIDATE_SID() defines session ID validation handler. This handler
|
||||
must validate if requested session ID exists in session data storage or not.
|
||||
Do not access PS(id) directly, but use this handler and it's parameter.
|
||||
- PS_UPDATE_TIMESTAMP() defines timestamp updating handler. This handler
|
||||
must update session data timestamp for GC if it is needed. e.g. Memcache
|
||||
updates timestap on read, so it does not need to update timestamp. Return
|
||||
SUCCESS simply for this case.
|
||||
- PS_CREATE_SID() should check session ID collision. Return NULL for failure.
|
||||
- More documentation can be found in ext/session/mod_files.c as comments.
|
||||
mod_files.c may be used as reference implementation.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user