Skip to content
PHP JavaScript
Find file
Latest commit 9541e8a Dave Marshall Initial Release
Failed to load latest commit information.
Slim Initial Release
.htaccess Initial Release
README.markdown Initial Release
functions.php Initial Release
index.php Initial Release
progress.js Initial Release
worker.php Initial Release


Asynchronous cache priming with progress bars via Gearman and Memcached

This is a simple example application of how I'm using Gearman and Memcached to provide the user feedback by using asynchronous workers to prime caches if they are not valid

See my blog post for more details at


Install Gearman and Memcached, including PECL modules

> sudo su
> apt-get install gearman libgearman-dev memcached
> pecl install memcache 
> pecl install gearman-beta
> echo "" > /etc/php5/conf.d/memcache.ini
> echo "" > /etc/php5/conf.d/gearman.ini
> /etc/init.d/apache2 restart

Install the application somewhere in the web root

> cd /var/www/
> git clone

Set the worker going

> cd /var/www/async-demo
> php worker.php

Hit the url

> firefox http://localhost/async-demo/

Slim PHP Microframework

The PHP framework used in this example is availabe at

Slim is released under the MIT public license.

Something went wrong with that request. Please try again.