Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#17083 closed New feature (fixed)

sessions.backends.cache does not allow non-default cache to be configured

Reported by: charles@… Owned by: Aymeric Augustin
Component: contrib.sessions 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

Django 1.3 introduced support for more than one cache to be defined. However, the cache-based session store backend does not support using a non-default backend.

A configuration option should be available to select the cache to be used by the Django session store cache backend.

Use case: One may want the session store to be kept in a replicated cache (to prevent user-visible disruption during failover events) vs cached data which can be regenerated without user-visible impact beyond performance.

Use case: One may want the session store to be kept in a distributed cache while keeping other content in a system-local cache.

Change History (9)

comment:1 by Aymeric Augustin, 13 years ago

Triage Stage: UnreviewedAccepted

Yes, this is a good suggestion.

comment:2 by Alex Tomkins, 12 years ago

Version: 1.3master

Sent a pull request which should allow a custom cache backend - https://github.com/django/django/pull/169

comment:3 by Claude Paroz, 12 years ago

Has patch: set
Needs tests: set

comment:4 by Aymeric Augustin, 12 years ago

Patch needs improvement: set

comment:5 by Aymeric Augustin, 12 years ago

For consistency with other parts of Django, I'd prefer adding a setting (yeah...) rather than hardcoding a cache name.

Pull request: https://github.com/django/django/pull/479

(I forgot to add a comment in the release notes.)

comment:6 by Aymeric Augustin, 12 years ago

Needs tests: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:7 by Aymeric Augustin, 12 years ago

Owner: changed from nobody to Aymeric Augustin

comment:8 by Aymeric Augustin <aymeric.augustin@…>, 12 years ago

Resolution: fixed
Status: newclosed

In 146ed13a111c97c1c04902a6c0eda1e4ee6e604c:

Fixed #17083 -- Allowed sessions to use non-default cache.

comment:9 by Aymeric Augustin <aymeric.augustin@…>, 12 years ago

In 0dcaddb57143048c4647047ccbb5574d2ea713a5:

Fixed #17083 -- Allowed sessions to use non-default cache.

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