PHP session always started, even when not needed
-
WP Cassify seems to eagerly start a PHP session without first making sure it has a reason to do so. This can introduce multi-request blocking behavior, and can load up a server with sessions for no good reason, both of which reduce scalability. Page caching plugins may help alleviate this, but using them shouldn’t be required to work around this behavior.
Please update the plugin so that a PHP session is not started unless required. A simple way to avoid starting a session is to first check if the session cookie exists, e.g.
isset($_COOKIE[session_name()])
Another option is to eliminate dependency on native PHP sessions entirely. One way is to store tokens/data in the database and directly manage the cookie, akin to WP. Another way is to reduce the scope of the plugin down to only what is needed for CAS auth & user mapping, and let WP handle the rest. This would help make things less awkward in load-balanced installations.
- The topic ‘PHP session always started, even when not needed’ is closed to new replies.