mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
[1.1.X] Corrected merge of r12411 to 1.1.X branch (see r12415).
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f764d7ffb1
commit
0e9f1553e1
3
django/core/cache/backends/db.py
vendored
3
django/core/cache/backends/db.py
vendored
@ -81,7 +81,8 @@ class CacheClass(BaseCache):
|
||||
def has_key(self, key):
|
||||
now = datetime.now().replace(microsecond=0)
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("SELECT cache_key FROM %s WHERE cache_key = %%s and expires > %%s" % self._table, [key, now])
|
||||
cursor.execute("SELECT cache_key FROM %s WHERE cache_key = %%s and expires > %%s" % self._table,
|
||||
[key, connection.ops.value_to_db_datetime(now)])
|
||||
return cursor.fetchone() is not None
|
||||
|
||||
def _cull(self, cursor, now):
|
||||
|
Loading…
x
Reference in New Issue
Block a user