Strategies to cache from MySQL (or any DB I suppose)

Paul G paul-lists at perforge.com
Mon Nov 7 06:08:19 PST 2005


----- Original Message ----- 
From: "Jacob Coby" <jcoby at listingbook.com>
To: <memcached at lists.danga.com>
Sent: Monday, November 07, 2005 9:29 AM
Subject: Re: Strategies to cache from MySQL (or any DB I suppose)

> Well, if you use postgresql, there is the pgmemcache extension.  I don't
> know how easy mysql is to extend (or have it call an external process in
> a trigger), but you may be able to write something similar?
>
> http://people.freebsd.org/~seanc/pgmemcache/

mysql already does query caching, from 4.something and up i believe. the
catch there is that a write to said table invalidates the cache. depending
on your usage pattern, this can be hacked around by sticking updates into a
second table with the same schema, performing queries against both and
flushing to the real table at an interval. this is still inferior to using
memcached of course, but comparable to pgmemcache with no mucking about
required.

-p



More information about the memcached mailing list