On Mon, 2007-11-05 at 19:21 -0800, Hugh Bien wrote: > Hi all, > > > I'm trying to clear the cache table. Here's the code I'm using with > Python 2.5 and Django version 0.96: > > > def clear_cache(): > from django.db import connection > cursor = connection.cursor() > cursor.execute("DELETE FROM django_cache WHERE 1=1") > > > This is for the a SQLite3 backend, but it doesn't seem to work. I > tried executing it in the command line and the table still doesn't > clear. Is there something obvious I'm missing?
django.db.transaction.commit_unless_managed() is probably going to be necessary, since you're implicitly in a transaction here. Regards, Malcolm > -- What if there were no hypothetical questions? http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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-users?hl=en -~----------~----~----~----~------~----~------~--~---