diff --git a/django/core/cache/backends/filebased.py b/django/core/cache/backends/filebased.py index 88a8b528b5..2a8b24ddfc 100644 --- a/django/core/cache/backends/filebased.py +++ b/django/core/cache/backends/filebased.py @@ -55,7 +55,7 @@ class FileBasedCache(BaseCache): with io.open(fd, 'wb') as f: expiry = self.get_backend_timeout(timeout) f.write(pickle.dumps(expiry, pickle.HIGHEST_PROTOCOL)) - f.write(zlib.compress(pickle.dumps(value, pickle.HIGHEST_PROTOCOL), -1)) + f.write(zlib.compress(pickle.dumps(value, pickle.HIGHEST_PROTOCOL))) file_move_safe(tmp_path, fname, allow_overwrite=True) renamed = True finally: