Code

Opened 3 years ago

Closed 6 months ago

#15888 closed Cleanup/optimization (fixed)

Inspect `settings.CACHES` in order to make`createcachetable` automatic

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

Description

Currently createcachetable requires the cache table name in argument. This information could be taken from the settings instead.

See http://code.djangoproject.com/ticket/15255#comment:2 for a more complete description of the idea.

Attachments (2)

15888-docs.patch (4.4 KB) - added by aaugustin 3 years ago.
15888-code-1.diff (8.1 KB) - added by claudep 16 months ago.
Tentative code implementation

Download all attachments as: .zip

Change History (11)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to aaugustin
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Since jacob supported this idea (see http://code.djangoproject.com/ticket/15255#comment:4), I'm marking it as accepted.

comment:2 Changed 3 years ago by aaugustin

Here is a proposed patch for the docs. I'll wait until #15255 gets committed before working on a patch for the code — both tickets touch the same piece of code and the patches would conflict.

Changed 3 years ago by aaugustin

comment:3 Changed 3 years ago by jezdez

  • UI/UX unset

FYI, #15255 was committed.

comment:4 Changed 2 years ago by aaugustin

  • Owner changed from aaugustin to nobody

Changed 16 months ago by claudep

Tentative code implementation

comment:5 Changed 16 months ago by claudep

I've just attached an initial implementation. Tests should probably be still completed.
The question is now: do we want to keep the legacy behaviour of specifying one or more table names as arguments, or do we want to deprecate this?

comment:6 Changed 6 months ago by claudep

  • Has patch set
  • Version changed from 1.3 to master

Patch updated to current trunk and PR created: https://github.com/django/django/pull/1727

comment:7 Changed 6 months ago by aaugustin

  • Patch needs improvement set

Tim suggested some improvements on the pull request.

comment:8 Changed 6 months ago by timo

  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

comment:9 Changed 6 months ago by Claude Paroz <claude@…>

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

In 1e8eadc94e3b27fe90ce9356b48e8543a1ff590e:

Fixed #15888 -- Made tablename argument of createcachetable optional

Thanks Aymeric Augustin for the report and the documentation and
Tim Graham for the review.

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.