Re: Re: Would like to take over Cache Lite
| From: | Joe Stump | Date: | Fri, 23 Jan 2009 18:03:12 +0000 |
| Subject: | Re: Re: Would like to take over Cache Lite | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51477@lists.php.net to get a copy of this message | ||
On Jan 23, 2009, at 5:26 AM, Igor Feghali wrote:
So, at Digg, we have a whole Cache framework that includes a standard interface for Memcached and APC. It's container-based, much like MDB2/DB drivers. It also includes a "Local" cache (just a global array, basically) so the same request doesn't fetch a cached object more than once in a request along with a "Chain" driver that uses the chain of responsibility pattern (e.g. Is it in Local? No? APC? No? Is it in Memcached? Yes? Go and set it in APC and Local and then return it). It also has faux multi-get for the containers that don't support it, etc. It, roughly, follows the Memcache interface from PHP and has some other syntactical sugar (e.g. $cache->my_key_name to get()). It wouldn't be terribly difficult to decouple this from our internal code. Let me see if I can sucker a few of my Diggers into refactoring and releasing it. --JoeCache is kinda .. dead I think - And most people i know think it has a weird design :-) Perhaps a new package is in order, Cache_Lite_Memcache that is API compatible or even just a new package with completely new design and approach to things. Perhaps Cache2 can be started ? Just thinking out loud now.Strong +1 for a totally new package. I would go with the name "Cache_Memcache", plus I would suggest to deprecate Cache in favor of it.