We are trying to update memcached objects when we write to the database to avoid having to read them from database after inserts/updates.
For our forum post object we ha
We encountered this in our system. We modified get so
Our database load dropped by a factor of 100 when we implemented this.
function get($key) {
$value=$m->get($key);
if ($value===false) $m->set($key, 'g', $ttl=8);
else while ($value==='g') {
sleep(1);
$value=$m->get($key);
}
return $value;
}