News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mike Willbanks' Blog:
Zend Framework Cache Backend Libmemcached + Session Cache
October 25, 2010 @ 10:13:11

Mike Willbanks has a new tutorial posted to his blog today about combining memcache and the Zend Framework's caching component to work with session handling.

If I haven't said it before, I suppose I will say it now, I love memcached; it is a wonderful tool to have in your tool belt. However, Zend Framework does not currently have an official cache adapter for Memcached (it has one for the extension memcache but not memcached). [...] About 6-9 months ago, I had implemented a Session_SaveHandler_Cache (although it seems some others have as well), to plug this all in together and keep things consistent in a ZF application. It now enables us to utilize the consistent hashing from the Libmemcached adapter by using the PHP Memcached extension.

He moves on into the details of how to save session information into the memcache with a Zend Framework application, using a Zend_Session_SaveHandler_Cache component (code included) as a light-weight interface between the caching server and the application. He also includes the configuration you'll need to add to your application.ini, additions to the bootstrap and a neat trick using the Subversion revision to prefix the cache entry name (a "versioned" caching system).

0 comments voice your opinion now!
zendframework cache backend memcache session tutorial


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Zend Framework application's PHPUnit suite 3x faster

DevShed: Creating Image Streams from Existing Graphics with the GD Library in PHP

Content with Style: Remove nodes in SimpleXMLElement

Stefan Koopmanshcap's Blog: Installing the Geoip PECL package for Zend Server on OSX

NetBeans Blog: PHPUnit support added


Community Events





Don't see your event here?
Let us know!


deployment zendserver development threedevsandamaybe interview series list introduction release conference tips developer language code laravel podcast symfony api community framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework