[Django] #30654: Optimize session cache backend KEY_PREFIX settings to support dynamic configuration

5 views
Skip to first unread message

Django

unread,
Jul 23, 2019, 4:18:33 AM7/23/19
to django-...@googlegroups.com
#30654: Optimize session cache backend KEY_PREFIX settings to support dynamic
configuration
------------------------------------------------+------------------------
Reporter: hfq-mengyangyang | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.sessions | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Session cache backend KEY_PREFIX settings is static written in
`django.contrib.sessions.backends.cache` module. Remove the KEY_PREFIX
settings to `django.conf.settings` and support dynamic configuration.

--
Ticket URL: <https://code.djangoproject.com/ticket/30654>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 23, 2019, 4:31:54 AM7/23/19
to django-...@googlegroups.com
#30654: Optimize session cache backend KEY_PREFIX settings to support dynamic
configuration.
----------------------------------+--------------------------------------
Reporter: hfq-mengyangyang | Owner: nobody
Type: New feature | Status: closed
Component: contrib.sessions | Version: master
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => invalid
* version: 2.2 => master
* type: Cleanup/optimization => New feature


Comment:

Thanks for this proposition, however `SessionStore` is
[https://docs.djangoproject.com/en/2.2/topics/http/sessions/#extending-
database-backed-session-engines extendable] so you can easily change
`cache_key_prefix`, e.g.
{{{
class CustomSessionStore(SessionStore):
cache_key_prefix = 'my_custom_prefix'
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30654#comment:1>

Reply all
Reply to author
Forward
0 new messages