Opened 14 years ago

Closed 11 years ago

#15888 closed Cleanup/optimization (fixed)

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

Reported by: Aymeric Augustin Owned by: nobody
Component: Core (Cache system) Version: dev
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 Aymeric Augustin 14 years ago.
15888-code-1.diff (8.1 KB ) - added by Claude Paroz 12 years ago.
Tentative code implementation

Download all attachments as: .zip

Change History (11)

comment:1 by Aymeric Augustin, 14 years ago

Owner: changed from nobody to Aymeric Augustin
Triage Stage: UnreviewedAccepted

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

comment:2 by Aymeric Augustin, 14 years ago

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.

by Aymeric Augustin, 14 years ago

Attachment: 15888-docs.patch added

comment:3 by Jannis Leidel, 13 years ago

UI/UX: unset

FYI, #15255 was committed.

comment:4 by Aymeric Augustin, 13 years ago

Owner: changed from Aymeric Augustin to nobody

by Claude Paroz, 12 years ago

Attachment: 15888-code-1.diff added

Tentative code implementation

comment:5 by Claude Paroz, 12 years ago

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 by Claude Paroz, 11 years ago

Has patch: set
Version: 1.3master

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

comment:7 by Aymeric Augustin, 11 years ago

Patch needs improvement: set

Tim suggested some improvements on the pull request.

comment:8 by Tim Graham, 11 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:9 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

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.

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