<div><div><div>
<br>
</div>Thank you for so concisely listing the options. I appreciate it.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">- use memcached's "add" function to create a lock:<br>while (!memcached.add("lock_user_1")) sleep (1);
<br>... fetch user 1 from memcache or DB, update user 1, save to DB and<br>memcache ...<br>memcached.delete("lock_user_1");</blockquote><div><br>
With even simple apps with very small user bases, it would be almost impossible to avoid deadlock situations.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>The final solution is to just expire the data whenever its updated,<br>>but that seems awfully wasteful.
<br><br>How so?<br><br>Jacques.<br><br><br></blockquote></div>
<br>
Well, its wasteful because I know what that data is and I rather not
have to run an extra select. But you're right, perhaps it isn't
wasteful because its necessary. I don't see any other way out of it. <br>
<br>
Thank you,<br>
<br>
Michael Carter<br>