Automatically maintaining cache consistency

Dustin Sallings dustin at spy.net
Thu Aug 30 02:44:47 UTC 2007


On Aug 29, 2007, at 18:30, Mohammad J wrote:

> > It can't be done, at least not in a precise way.  There is no way to
> > know exactly which data a SQL statement will affect without actually
> > being able to fully execute the statement the same way your database
> > would, at which point all the speed advantage is gone.
>
> You are correct that one of the limitations of any analysis program  
> is that unless it does full SQL parsing, there is no way to be sure  
> your system isn't placed in an inconsistent state.  However, in my  
> application, updates are only performed using the primary key of  
> the tables being updated (for performance reasons).  This is true  
> in all cases in my application, and thus it was relatively simple  
> to write an analysis application that identified all queries that  
> make updates.

	pgmemcache will allow you to send invalidations for any touches a  
given row in a table iff you know the memcached keys that need to be  
invalidated.

-- 
Dustin Sallings


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070829/87ebd419/attachment.htm


More information about the memcached mailing list