diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-03-18 12:28:53 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-03-18 12:28:53 +0000 |
| commit | f781205859484ecd5e7af040b5b52f4edaa6d019 (patch) | |
| tree | a7eeb3fc6210ef7d042240c2a0c301135757aee3 /django/core/cache | |
| parent | 0abd798b9bd25e5a92056c7213959ac17570381b (diff) | |
[1.0.X] Corrected a problem with the database cache backend, and refactored the cache test suite to ensure that all the backends are actually tested.
Partial merge of r10031 and r10071 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10086 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 f153993117..eb459a076d 100644 --- a/django/core/cache/backends/db.py +++ b/django/core/cache/backends/db.py @@ -65,6 +65,7 @@ class CacheClass(BaseCache): cursor.execute("INSERT INTO %s (cache_key, value, expires) VALUES (%%s, %%s, %%s)" % self._table, [key, encoded, str(exp)]) except DatabaseError: # To be threadsafe, updates/inserts are allowed to fail silently + transaction.rollback() return False else: transaction.commit_unless_managed() |
