<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<meta content="text/html;charset=ISO-8859-15" http-equiv="Content-Type">
<font face="monospace">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<br>
<br>
If you slow down your code, all happens normally.<br>
<br>
$memcache = new Memcache;<br>
$memcache-&gt;addServer('127.0.0.1', 11211);<br>
$memcache-&gt;flush();<br>
<br>
$time = time()+1; //one second future<br>
while(time() &lt; $time) {<br>
  //sleep<br>
}<br>
<br>
$memcache-&gt;set('Lock', "Locked");<br>
<br>
if ($memcache-&gt;get('Lock'))<br>
{<br>
echo "Lock found";<br>
}<br>
else<br>
{<br>
echo "Lock not found";<br>
}<br>
<br>
Feel free! Use PHP!<br>
<br>
Marcio<br>
<br>
<br>
<br>
Jeanot Bruchmann escreveu:</font>
<blockquote cite="mid924973921@web.de" type="cite"><font
 face="monospace">Hi there,<br>
  <br>
first, sorry for the poor english.<br>
  <br>
I hope, you can help me out with the follow problem:<br>
  <br>
PHP-Code:<br>
$memcache = new Memcache;<br>
$memcache-&gt;addServer('127.0.0.1', 11211);<br>
$memcache-&gt;flush();<br>
$memcache-&gt;set('Lock', "Locked");<br>
  <br>
if ($memcache-&gt;get('Lock'))<br>
{<br>
echo "Lock found";<br>
}<br>
else<br>
{<br>
echo "Lock not found";<br>
}<br>
  <br>
  <br>
Output:<br>
Lock not found<br>
  <br>
Why???<br>
Write PHP the Memcache after the Script has ended? Can you help me?<br>
  <br>
regards<br>
Jeanot Bruchmann<br>
  <br>
_______________________________________<br>
GRATIS: Movie-FLAT. Jetzt freischalten!<br>
  <a class="moz-txt-link-freetext"
 href="http://freemail.web.de/club/maxdome.htm">http://freemail.web.de/club/maxdome.htm</a><br>
  <br>
  <br>
  </font></blockquote>
<font face="monospace"><br>
</font>
<br>
</body>
</html>