diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-08-31 00:44:46 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-08-31 00:44:46 +0000 |
| commit | 2a0f4fb5da0ed4224dabe280f7a6aefcb21f9911 (patch) | |
| tree | ffc8c679177302b1fd426fe30caa305c616efb04 /django/core/cache | |
| parent | 0de3e7a75684798fd86616571b27f488a4c06d07 (diff) | |
Fixed #14199 -- Added a missing table creation statement in the db cache backend cull implementation, and added tests for cache culling. Thanks to Tim for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/cache')
| -rw-r--r-- | django/core/cache/backends/db.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/core/cache/backends/db.py b/django/core/cache/backends/db.py index 1300dd4b66..833fa749aa 100644 --- a/django/core/cache/backends/db.py +++ b/django/core/cache/backends/db.py @@ -124,6 +124,7 @@ class CacheClass(BaseCache): if self._cull_frequency == 0: self.clear() else: + table = connections[db].ops.quote_name(self._table) cursor.execute("DELETE FROM %s WHERE expires < %%s" % table, [connections[db].ops.value_to_db_datetime(now)]) cursor.execute("SELECT COUNT(*) FROM %s" % table) |
