Changes between Initial Version and Version 1 of Ticket #21200, comment 3


Ignore:
Timestamp:
Oct 2, 2013, 11:50:49 AM (11 years ago)
Author:
Thomas C

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21200, comment 3

    initial v1  
    11Just 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.
    22
    3 The problem is that with the `LockMemCache`, when such an error occurs, the cache fails silently whereas it raises an `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].
     3The 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].
    44
    55This is dangerous because someone using `LockMemCache` could have systematic cache failures going silent.
Back to Top