Django

Code

Ticket #6086 (closed: fixed)

Opened 2 years ago

Last modified 1 year ago

Refactor django.core.cache to deprecate "simple" backend

Reported by: pbx Assigned to: nobody
Milestone: Component: Cache system
Version: SVN Keywords: sprintdec01
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 1

Description

As detailed in this django-dev thread, the "simple" cache backend doesn't have much reason to live any more.

The attached patch refactors the cache backends to eliminate simple.py, and issues a DeprecationWarning? per Jacob's recommendation.

Thanks to Brian Johnson and David Schein for a great afternoon of cafe coding!

Attachments

simple_cache_deprecate.diff (6.2 kB) - added by pbx on 12/01/07 14:32:35.
cache_test_fix.diff (458 bytes) - added by pbx on 12/01/07 15:03:42.
global_settings_locmem.diff (452 bytes) - added by pbx on 12/01/07 15:07:16.
Patch to make global_settings.py use "locmem" instead of "simple", per Malcolm's comment
rm_simple.diff (2.4 kB) - added by pbx on 12/01/07 15:33:24.
Sorry - original patch didn't include removal of simple.py
6086_combined_patch.diff (9.6 kB) - added by mcroydon on 12/01/07 16:16:18.
Updating combined diff to include rm_simple.diff (patch with -p1)

Change History

12/01/07 14:32:35 changed by pbx

  • attachment simple_cache_deprecate.diff added.

12/01/07 14:46:54 changed by mtredinnick

  • needs_better_patch set to 1.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

Django's global_settings.py file still refers to "simple:///", so that should be fixed. Otherwise, the patch looks good. Fix the last thing and it's ready-for-checkin.

12/01/07 15:03:14 changed by pbx

Cool. Also, we found a test (test_data_types) that did not actually test anything, and fixed that. (Patch attached.)

12/01/07 15:03:42 changed by pbx

  • attachment cache_test_fix.diff added.

12/01/07 15:07:16 changed by pbx

  • attachment global_settings_locmem.diff added.

Patch to make global_settings.py use "locmem" instead of "simple", per Malcolm's comment

12/01/07 15:29:12 changed by mcroydon

  • stage changed from Accepted to Ready for checkin.

This looks good to me. I've combined the above in to a single patch for convenience. Ready for checkin pending review.

12/01/07 15:33:24 changed by pbx

  • attachment rm_simple.diff added.

Sorry - original patch didn't include removal of simple.py

12/01/07 16:16:18 changed by mcroydon

  • attachment 6086_combined_patch.diff added.

Updating combined diff to include rm_simple.diff (patch with -p1)

12/01/07 18:35:14 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [6822]) Fixed #6086 -- Deprecate the "simple" cache backend in favour of "locmem". Thanks, Paul Bissex.

07/18/08 18:46:11 changed by gwilson

(In [7965]) Refs #6086 -- Changed settings docs to reflect deprecation of "simple" cache backend in [6822].


Add/Change #6086 (Refactor django.core.cache to deprecate "simple" backend)




Change Properties
Action