Commit 0e9f1553 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[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
parent f764d7ff
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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):