nicktacular / php-mongo-session

A PHP session handler with a Mongo DB backend.
MIT License
18 stars 6 forks source link

read-only non-locking session #17

Open rocksfrow opened 9 years ago

rocksfrow commented 9 years ago

If #14 ends up a no-go, I was thinking it might be interesting to add a read-only mode which would allow applications to access locked sessions, but prevent writes.

For scenarios where a bunch of separate sections of a site are loading via ajax (and not writing to the session, only reading), this would enable you to have true asynchronous requests to the same session.

This implementation would of course still require a lock for write access.

Currently the read() method is requiring a lock.

nicktacular commented 9 years ago

This is a good idea, too. Probably a lot simpler than #14 and in a majority of cases might be what you want anyway.

rocksfrow commented 9 years ago

And makes me less nervous! Haha On Jan 22, 2015 1:22 PM, "Nick Ilyin" notifications@github.com wrote:

This is a good idea, too. Probably a lot simpler than #14 https://github.com/nicktacular/php-mongo-session/issues/14 and in a majority of cases might be what you want anyway.

— Reply to this email directly or view it on GitHub https://github.com/nicktacular/php-mongo-session/issues/17#issuecomment-71070449 .

nicktacular commented 9 years ago

Having thought about this more, I think this is a must have. A few things need to be done here:

How does that sound?

FYI see #16