More Related Content
Similar to Speeding up Page Load Times by Using the Starling Queue Server
Similar to Speeding up Page Load Times by Using the Starling Queue Server (20)
Speeding up Page Load Times by Using the Starling Queue Server
- 1. Faster Response Times By using the Starling Queue Server Erik Osterman Launch 10 Labs LLC http://launch10.com
- 7. PHP Example (request) // index.php <?php $memcache = new Memcache(); $memcache->addServer('localhost', 22122); $memcache->set('last_seen', Array('user_id' => $_SESSION['user_id'], 'timestamp' => time())); ?>
- 8. PHP Example (batch) <?php // process-jobs.php $memcache = new Memcache(); $memcache->addServer('localhost', 22122); while(true) { if($job = $memcache->get('last_seen')) { // Process $job } else { // Queue empty! sleep(1); } } ?>
- 11. Q & A What did I miss? tinyurl.com/L10-starling Erik Osterman www.launch10.com [email_address]