Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#6086 closed (fixed)

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

Reported by: Paul Bissex Owned by: nobody
Component: Core (Cache system) Version: dev
Severity: Keywords: sprintdec01
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

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 (5)

simple_cache_deprecate.diff (6.2 KB ) - added by Paul Bissex 17 years ago.
cache_test_fix.diff (458 bytes ) - added by Paul Bissex 17 years ago.
global_settings_locmem.diff (452 bytes ) - added by Paul Bissex 17 years ago.
Patch to make global_settings.py use "locmem" instead of "simple", per Malcolm's comment
rm_simple.diff (2.4 KB ) - added by Paul Bissex 17 years ago.
Sorry - original patch didn't include removal of simple.py
6086_combined_patch.diff (9.6 KB ) - added by mcroydon 17 years ago.
Updating combined diff to include rm_simple.diff (patch with -p1)

Download all attachments as: .zip

Change History (10)

by Paul Bissex, 17 years ago

Attachment: simple_cache_deprecate.diff added

comment:1 by Malcolm Tredinnick, 17 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

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.

comment:2 by Paul Bissex, 17 years ago

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

by Paul Bissex, 17 years ago

Attachment: cache_test_fix.diff added

by Paul Bissex, 17 years ago

Attachment: global_settings_locmem.diff added

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

comment:3 by mcroydon, 17 years ago

Triage Stage: AcceptedReady for checkin

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

by Paul Bissex, 17 years ago

Attachment: rm_simple.diff added

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

by mcroydon, 17 years ago

Attachment: 6086_combined_patch.diff added

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

comment:4 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

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

comment:5 by Gary Wilson, 16 years ago

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

Note: See TracTickets for help on using tickets.
Back to Top