title: Memcached not listening to expiration time
body: <p>I'm using Memcached in conjunction with my PHP web app written in CodeIgniter. I utilize this Memcached library <a href="https://github.com/tomschlick/memcached-library" rel="nofollow">https://github.com/tomschlick/memcached-library</a> When I cache data, I give it an expiration time of 7200, or 2 hours.</p>
  
  <p>Snippet of a model query:</p>
  
  <pre><code>$result = $this-&gt;memcached_library-&gt;get(md5($sql));
  if (!$result) {
       $cursor = $this-&gt;db-&gt;query($sql);
       $result = $cursor-&gt;row();
       $this-&gt;memcached_library-&gt;set(md5($sql), $result, 7200);
  }
  return $result;
  </code></pre>
  
  <p>Cool, this works for setting data into Memcached. I can see the results, all is working well. The problem comes in that after 2 hours after placing this data into Memcached.</p>
  
  <p>From my understanding, when executing the get function, Memcached should recognize that the cached data has hit past its expired date and thus marks it as invalid (not necessarily deleting it from memory however). When the PHP call to get the data, it should return false, which will then in turn cause my if statement to be evaluated as true and refetch the data and set the data in Memcached yet again.</p>
  
  <p>However, it seems as if Memcached never says the data is invalid, and the same old data is in there from before the 2 hour expiration limit. If I manually call flush on Memcached (invalidating all data in the cache), the data is set into Memcached properly yet again, but we run into the same 2 hour expiration limit problem yet again.</p>