All pastes #369240 Raw Edit

Stuff

public text v1 · immutable
#369240 ·published 2007-02-23 18:03 UTC
rendered paste body
$cache_object = $memcache->get("cache_$hash");
$cache_expiration = $memcache->get("cache_${hash}_ts");
$updating = $memcache->get("lock_${lock_hash}");
if($cache_object && ($cache_expiration > time())) {

} elseif($cache_object && ($cache_expiration < time())) {
        $updating = $memcache->get("lock_${lock_hash}");
        if(strcmp($updating,"locked") == 0) {
        } else {
                $updating = $memcache->set("lock_${lock_hash}",'1');
                fork("php ./ebay_update.php \"$query\"");
        }
} else {
        $updating = $memcache->get("lock_${lock_hash}");
        if(strcmp($updating,"locked") == 0) {
        } else {
                $updating = $memcache->set("lock_${lock_hash}",'1');
                fork("php ./ebay_update.php \"$query\"");
        }
        $r = rand(1,20);
        $cache_object = $memcache->get("cache_popitem$r");
}