Changes between Initial Version and Version 1 of Ticket #21200, comment 3
- Timestamp:
- Oct 2, 2013, 11:50:49 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #21200, comment 3
initial v1 1 1 Just to clarify the issue: several cache backends rely on `pickle.dumps()` to serialize some object in order to save them (in database, live memory, etc.). This method can raise an exception when the object cannot be pickled, which can happen in some circumstances. 2 2 3 The problem is that with the `LockMemCache`, when such an error occurs, the cache fails silently whereas it raises a n`PickleError` with some other caches (e.g. `DatabaseCache`). This behavior was introduced a long time ago by [https://github.com/django/django/commit/ae7f04caab1b4f2a2b509b036499e4e042caaac6#diff-2060839a7f833cb85ea21530ca37887aR45 ae7f04caab1b4f2a2b509b036499e4e042caaac6].3 The problem is that with the `LockMemCache`, when such an error occurs, the cache fails silently whereas it raises a `PickleError` with some other caches (e.g. `DatabaseCache`). This behavior was introduced a long time ago by [https://github.com/django/django/commit/ae7f04caab1b4f2a2b509b036499e4e042caaac6#diff-2060839a7f833cb85ea21530ca37887aR45 ae7f04caab1b4f2a2b509b036499e4e042caaac6]. 4 4 5 5 This is dangerous because someone using `LockMemCache` could have systematic cache failures going silent.