I understand how memcached deletes items to be this, proto-code
stylie:

function server_add/replace_value(value){

  while (server_used_memory>server_max_usable_memory)
  {
       delete_oldest_item()
  }

server_save(value)

}

understanding that the deleted items might more than one, would it be
possible to somehow optionally return these deleted values to the
functions on the application server? This would be spiffy for
controlling database writes.

a bit more of my shabby proto-code

$deleted=null; //a variable to return the deleted values into
$memcache->add($key,$value,false,600,$deleted);

if($deleted!=null)
{
  foreach($deleted as $key=>$value)
  {
       dbase_save($deleted);
  }
}

Let me know what you think. :-)





Reply via email to