> I understand that memcached is a cache server, and mysql is a db server.
> In my case, the flow is like this:
> for read, if cache hits, great, pass the value back directly; if miss, read
> from mysql server.
---- here if you write to memcache is better, you keep you cache updated


> for write, if hits, write both cache and sql server; if miss, write only sql
> server.
---- well you must check your app, maybe lock database, delete from
cache, write database, unlock database, write cache is better to
prevent users reading not updated cache
other solution is write database, and cache, or cache and database,
must check what is better for your app



> I personally do not care about how mysql caches queries, or how mysql
> batches writes.
> I trust it to do its job efficiently.
> So it doesn't seem like memcached server could talk to mysql server
> directly.

no, memcached don´t talk with mysql... it´s a cache server, you can
use any tool with it, i have a project where i use memcached as a
microprocessor memory

> It has to be memcached server reply memcached client about the miss,
> while the client takes care of the remote connection with mysql server.
> Is this correct?
i didn´t understand the question

Reply via email to