Re: Custom SQL to delete cache table

2007-11-06 Thread Malcolm Tredinnick
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() >

Custom SQL to delete cache table

2007-11-05 Thread Hugh Bien
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,