Skip to content

Support for more granular session lock behaviors [possible patch] #89

@ericmerrill

Description

@ericmerrill

I do programing with a large LMS, Moodle (moodle.org), and support has been added for memcached sessions to improve performance, but something we have noticed is that both lock max wait and lock expiration are tied to max_execution_time at the time of session_start(), which is not optimal for us (and I'm sure we're not alone).

I propose two new settings, memcached.sess_lock_max_wait and memcached.sess_lock_expire which allow the setting of the max time to wait for a lock before dying, and the time for a lock to expire, respectively.

I've done a first pass of the patch at:
https://github.com/merrill-oakland/php-memcached/compare/c10de3699faa3ecb4cb6861d6c92157e0c7e18ce...sessionlocks

Current behavior should be maintained with settings of 0 (or unset).
I've never written stuff for this project, so I followed the coding styles that I observed, but I may have missed something. I also need to look at the test system to see about adding tests, but the same tests pass/fail both before and after this patch.

Thoughts? Recommendations? Is this a possibility?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions