|
Hi Jeanot, I think the flush() function runs in
background or in a different thread, and the variable 'Lock' getting
invalidate with the flush. Maybe dormando can explain this :P If you slow down your code, all happens normally. $memcache = new Memcache; $memcache->addServer('127.0.0.1', 11211); $memcache->flush(); $time = time()+1; //one second future while(time() < $time) { //sleep } $memcache->set('Lock', "Locked"); if ($memcache->get('Lock')) { echo "Lock found"; } else { echo "Lock not found"; } Feel free! Use PHP! Marcio Jeanot Bruchmann escreveu: Hi there, |
- [Re: PHP-Problem] Marcio Henrique Toloi
- Re: [Re: PHP-Problem] dormando
