Best practice for multi-table caching

Perrin Harkins perrin at
Wed Feb 23 20:26:35 PST 2005

On Wed, 2005-02-23 at 16:52 -0800, Jon Drukman wrote:
> Is there an easy solution?

No.  This is what databases are for.  If someone found an easy way to
have an up-to-date cache of a database that performed better than a
database and never served out of date results, the database vendors
would all put it in their products.

>  I'm stumped... Any ideas?

Accept that keeping your cache 100% in sync with your database is
impossible, and only cache things that you can tolerate some degree of
inconsistency on.  Most applications can tolerate being behind the
database to some degree.  Allowing a 30 second cache on a hot query
might save you thousands of trips to the database.

- Perrin

More information about the memcached mailing list