Closed nicktacular closed 9 years ago
Last night I wrote a session emulator in PHP. Going to test it out and add in some tests for this class. One thing I realized is that sessions could be far more flexible if we abandoned using session_
functions and $_SESSION
variable in PHP. Consider a session handler that gave you the ability to do a non-blocking read with $handler->get('key')
or $handler->write('key', 'data')
with the ability to not block, similar to what LOCK_NB
does in PHPs flock
function. </rant>
Anyhow, I'll post the emulator sometime next week most likely.
FYI @rocksfrow @mikeytag
Almost done with this FYI. Should be another couple of days to finish.
Just a quick update. I've finished the mocking lib and have completed some tests for this lib. @rocksfrow you'll be interested to know that I've tracked down a small bug relating to locks being left in the lock collection. If there's ever a session id regeneration that occurs, that does not clean up after it self and incorrectly assumes the presence of a the new session lock without deleting the old one. this will definitely cause locks to remain. So any instance of remaining locks isn't as bad as it seems (i.e. locked out users) it most likely means session id regeneration.
I continue down the testing path and hope to have a new branch up soon.
What do you guys think about introducing a new set of methods that are smarter regarding session locks?
I've committed to a branch called testing
. This is my first step towards working on improvements for this class. Let's discuss in here with references to the code. Here are my @todos
on this:
testing
branch which is effectively no different from master
from a performance perspective.These are all up for grabs, if you're interested. Would someone like to take on # 4?
The description says it all. Spinoff from #14.