update strategy

mrot mrot at neostrada.pl
Sat Oct 8 00:20:08 PDT 2005


Hi,

I have a question about data update strategy.
Assume that we cache database queries and their results.
Who is responsible for updating cache if one of the processes updates 
data in database ?
I.e.
clients do (pseudocode):
 value=mc->get("SELECT description FROM table1 where id=123");
And we obtain the data fomr cache. Looks good....

But one of the clients does:
MySQL database.
database.execeuteQuery("UPDATE description SET description='new 
description' WHERE id=123");

Now we have inconsistency between cache and database.
How this should be handled ?


Regards


More information about the memcached mailing list