On Sat, 2007-03-10 at 13:24 -0800, Samuel wrote: > I ran into a problem with Django's caching backend when using memcache > and threads. Instances of memcache.Client are not thread-safe, and > Django creates a single instance shared by all threads. I wanted to > post this here rather than report a bug since it's not necessarily a > bug in Django; however, memcache.py isn't really to blame either. > > The issue came up while running through fastcgi. The keys and values > where being swapped/mixed up which led to seemingly impossible errors. > It wasn't really much of an issue since I just switched to a > preforked.
Good point. You're right, the code in Django is only going to have the same thread-safety as memcache.Client (all our accesses to that object are atomic). This has to be fixable without too much pain, so if you could file a ticket, that would be great. That gives us somewhere to point people to if they come across it before we can fix it (rule of thumb: once one person spots this, everybody suddenly notices it). Thanks for pointing this out. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---