Code

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6086 closed (fixed)

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

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

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 pbx 6 years ago.
cache_test_fix.diff (458 bytes) - added by pbx 6 years ago.
global_settings_locmem.diff (452 bytes) - added by pbx 6 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 pbx 6 years ago.
Sorry - original patch didn't include removal of simple.py
6086_combined_patch.diff (9.6 KB) - added by mcroydon 6 years ago.
Updating combined diff to include rm_simple.diff (patch with -p1)

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by pbx

comment:1 Changed 6 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 6 years ago by pbx

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

Changed 6 years ago by pbx

Changed 6 years ago by pbx

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

comment:3 Changed 6 years ago by mcroydon

  • Triage 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.

Changed 6 years ago by pbx

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

Changed 6 years ago by mcroydon

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

comment:4 Changed 6 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:5 Changed 6 years ago by gwilson

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.