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

Content with Style Blog: Quick helper script for ZF view translations

The Bakery: 11 New Posts of CakePHP Goodness

Zend Developer Zone: Get to know Flex and Zend_Amf

Code2Learn.com: Generating CSV file using CodeIgniter Framework

DevShed: Unit Testing


Community Events





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


community symfony series composer introduction opinion extension language podcast install list configure release version voicesoftheelephpant laravel api interview unittest conference

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