update strategy

Adam Michaels adam at digitalagemedia.net
Sat Oct 8 00:40:03 PDT 2005


http://people.freebsd.org/~seanc/pgmemcache/

----- Original Message ----- 
From: "mrot" <mrot at neostrada.pl>
To: <memcached at lists.danga.com>
Sent: Saturday, October 08, 2005 12:20 AM
Subject: update strategy


> 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