DBI & memcached (was: Google SoC: Fame and Fortune ($4500) await you!)
- From: Tim.Bunce@xxxxxxxxx (Tim Bunce)
- Date: Wed, 19 Mar 2008 10:59:12 +0000
On Wed, Mar 19, 2008 at 03:12:30AM -0000, Greg Sabino Mullane wrote:
I'm thinking about creating a merge between DBI and memcached. So cache
would be handled automaticly and integration would be seamless. This idea
occured to me a few times, since i was writing web app's which took
advantege of memcached. I was always getting tired of manual cache
management, and if you are using some ORM, it even harder to manage cache
propely. With plain SQL you could do something like $cache->set($key ,
$value), and then $cache->get($key), where $key would be your SQL statement,
which work fine in most cases.
I'm actually writing something very similar at the moment, and it's a lot
tricker than that, as you have to account for placeholders, as well as writing
a way to do cache invalidation. I'd be happy to have you take my work (which
is very Postgres-specific) and expand it into a generic DBI caching mechanism,
of which memcached would just be one method to use.
I'll also throw in a mention of DBD::Gofer, which now supports caching
using any class that implements get($key) and set($key, $value) methods.
In fact you can enable basic caching for idempotent queries in *any*
application, with no code changes, just by setting an env var:
DBI_AUTOPROXY='dbi:Gofer:transport=null;cache=1'
Tim.
.
- References:
- Re: Google SoC: Fame and Fortune ($4500) await you!
- From: Mikhail Maluyk
- Re: Google SoC: Fame and Fortune ($4500) await you!
- From: Greg Sabino Mullane
- Re: Google SoC: Fame and Fortune ($4500) await you!
- Prev by Date: Re: perl DBI oracle and error ORA 06502
- Next by Date: Re: Google SoC: Fame and Fortune ($4500) await you!
- Previous by thread: Re: Google SoC: Fame and Fortune ($4500) await you!
- Next by thread: Re: Google SoC: Fame and Fortune ($4500) await you!
- Index(es):
Relevant Pages
|
|