You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Having thought about this more, I think this is a must have. A few things need to be done here:
Upon calling read(), MongoSession needs to de-serialize the data using session_decode method to reference a local copy.
Introduce a get($key) method which will allow access to that reference without regard for locking since the assumption here is that it will be immutable.
Ensure that for referenced objects, clone is called on them so that there's no confusion of immutability.
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.
The text was updated successfully, but these errors were encountered: