def _cull(self, db, cursor, now):
        if self._cull_frequency == 0:
            self.clear()
        else:
            # When USE_TZ is True, 'now' will be an aware datetime in UTC.
            now = now.replace(tzinfo=None)
            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)
            num = cursor.fetchone()[0]
            if num > self._max_entries:
                cull_num = num + self._cull_frequency
                if connections[db].vendor == 'oracle':
                    # Oracle doesn't support LIMIT + OFFSET
                    cursor.execute("""SELECT cache_key FROM
(SELECT ROW_NUMBER() OVER (ORDER BY cache_key) AS counter, cache_key FROM %s)
WHERE counter > %%s AND COUNTER <= %%s""" % table, [cull_num, cull_num + 1])
                else:
                    # This isn't standard SQL, it's likely to break
                    # with some non officially supported databases
                    cursor.execute("SELECT cache_key FROM %s "
                                   "ORDER BY cache_key "
                                   "LIMIT 1 OFFSET %%s" % table, [cull_num])
                cursor.execute("DELETE FROM %s "
                               "WHERE cache_key < %%s" % table,
                               [cursor.fetchone()[0]])
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/core/cache/backends/db.py/DatabaseCache._cull/operator `/` -> `+`