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

NETTUTS.com: The Newbie's Guide to Test-Driven Development

PHPEverywhere: New Improved Yummy ADOdb Session Handler

Dave Marshall' Blog: Asynchronous cache priming with progress bars via Gearman, Memcache and Dojo

Zend Developer Zone: Announcing September's Zend Framework Bug Hunt Days

Evolt.org: Working With Fractions In CSS and PHP


Community Events





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


version language symfony voicesoftheelephpant interview security list composer library series community tool release artisanfiles conference framework laravel opinion podcast introduction

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