| Patrick Galbraith ( |
atomicity, less code
Yes, and also yes.
Also, this makes it atomic. You insert into db, have a trigger as I showed, memcached gets the data upon insert into mysql.
You can also have the read-through be in one shot. You do something like
'select col, memcached_set('namespace:key', col) from foo';
(my syntax might be off) The idea being you select get data and cache data at the same time!
Yes, and also yes.
Also, this makes it atomic. You insert into db, have a trigger as I showed, memcached gets the data upon insert into mysql.
You can also have the read-through be in one shot. You do something like
'select col, memcached_set('namespace:key', col) from foo';
(my syntax might be off) The idea being you select get data and cache data at the same time!