Re: Re: Would like to take over Cache Lite
| From: | Michael Gauthier | Date: | Sat, 24 Jan 2009 02:40:36 +0000 |
| Subject: | Re: Re: Would like to take over Cache Lite | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51479@lists.php.net to get a copy of this message | ||
On Fri, 2009-01-23 at 10:03 -0800, Joe Stump wrote:
> On Jan 23, 2009, at 5:26 AM, Igor Feghali wrote:
>
> >> Cache 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.
>
> 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.
That would be awesome. We've written a memcache class at silverorange
that adds syntactical sugar and cache namespaces. It would be great to
use a more comprehensive PEAR package instead. I look forward to
reviewing the proposal!
Cheers,
Mike