-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Implement RFC: Introduce session_start() options - read_only, unsafe_lock, lazy_write and lazy_destroy #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fix a test. Use proper types.
Test passes for non ZTS build. ZTS build failure seem to happen w/o this PR. |
Document is updated. Please review them. Thank you. |
. session_start() accepts all INI settings as array. e.g. ['cache_limiter'=>'private'] | ||
sets session.cache_limiter=private. It also supports 'read_and_close' which closes | ||
session data immediately after read data. | ||
. Save handlers accpets validate_sid(), update_timestamp() which validates session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo - accepts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed.
I've tried to get some benchmarks. It seems current system is too fast to get obvious performance difference. Test command: ab -c 7 -n 500000 http://localhost:8888/session.php
Old behavior was around 15000 reqs/sec. I think this would be good enough benchmark for merging. |
Implement RFC
https://wiki.php.net/rfc/session-lock-ini
"read_only" and "lazy_lock" are accepted. PR is made for other people to review.
Except comments, changes are minimal, but includes a few bug fixes that tests equality of PS(session_status) against "php_session_none". The comparison must be "PS(session_status) != php_session_active" as it has php_session_disabled.
Comments are appreciated.