Support the ongoing development of Laravel.io →
posted 9 years ago
Session
Last updated 2 years ago.
0

From what I can tell, Improved Session Engine Because new session layer is leaner and faster. Thus, the older one wasn't as lean, and was slow.

I believe you're right. When using $_SESSION it uses memory that a large public app cannot always afford.

"file" would be similar to native.

Why recreate a file/array session handler? Control. Knowing what's going on. Easier to debug when people raise issues. When things go wrong related to core PHP, php ini, or your server technology; Apache config, Nginx, etc.... it would be a head-ache. Controlling it all avoids having to work out who is to blame for a session bug.

0

Somebody over at reddit pointed me to a comment from Taylor Otwell that gives one of the reasons behind the change.

@christoferd it looks like you were correct - it's a matter of control. Specifically, the ability to control how the sessions were managed as part of Laravel's request/response cycle. Using PHP's native sessions meant that session cookie headers were sent outside of Laravel's response.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.