Ticket #7496: db.py.diff

File db.py.diff, 690 bytes (added by John Huddleston <huddlej@…>, 7 years ago)

db cache backend patch

  • django/core/cache/backends/db.py

     
    5353        exp = datetime.fromtimestamp(time.time() + timeout).replace(microsecond=0)
    5454        if num > self._max_entries:
    5555            self._cull(cursor, now)
    56         encoded = base64.encodestring(pickle.dumps(value, 2)).strip()
     56        encoded = base64.encodestring(pickle.dumps(value)).strip()
    5757        cursor.execute("SELECT cache_key FROM %s WHERE cache_key = %%s" % self._table, [key])
    5858        try:
    5959            if mode == 'set' and cursor.fetchone():
Back to Top