[Django] #23023: Update warning about local-memory cache for sessions

12 views
Skip to first unread message

Django

unread,
Jul 14, 2014, 8:18:28 AM7/14/14
to django-...@googlegroups.com
#23023: Update warning about local-memory cache for sessions
--------------------------------------+--------------------
Reporter: django@… | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+--------------------
I am suggesting an addition of a sentence to the warning about using the
local-memory cache for caching sessions due to a tricky to replicate
problem that I stumbled on. I started using cached_db ages ago but didn't
configure the cache settings, leaving it as the default local-memory cache
(In 1.2 it says that "This cache is multi-process and thread-safe", but
that's not the case now. Oh wait, in 1.2, the next paragraph contradicts
it's multi-process safeness - that's fixed now).

Mostly I'd sometimes notice that messages didn't appear until one or two
pages after it should, but recently, I actually started using the session
for more stuff and stuff was breaking sometimes and other times not -
session looked good in the database, but my views weren't always seeing
the same values. And everything was fine with runserver...

Doh! Multiple processes in WSGI/Apache2...

https://docs.djangoproject.com/en/dev/topics/http/sessions/#using-cached-
sessions
So, just because the local-memory cache is the default if not otherwise
configured, add an extra line to the existing warning:

Additionally, the local-memory cache backend is NOT multi-process safe,
therefore probably not a good choice for production environments.

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

Django

unread,
Jul 14, 2014, 1:08:54 PM7/14/14
to django-...@googlegroups.com
#23023: Update warning about local-memory cache for sessions
-------------------------------------+-------------------------------------
Reporter: django@… | Owner: timo
Type: | Status: assigned
Cleanup/optimization | Version: master
Component: Documentation | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timo):

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => timo
* needs_docs: => 0
* stage: Unreviewed => Ready for checkin


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

Django

unread,
Jul 16, 2014, 12:35:13 PM7/16/14
to django-...@googlegroups.com
#23023: Update warning about local-memory cache for sessions
-------------------------------------+-------------------------------------
Reporter: django@… | Owner: timo
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Documentation | Resolution: fixed

Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"7d0519c725f25cb0b52e42c60f2505e21d2ab4b3"]:
{{{
#!CommitTicketReference repository=""
revision="7d0519c725f25cb0b52e42c60f2505e21d2ab4b3"
Fixed #23023 -- Added warning against local-memory cache.

Thanks django at kerz.id.au.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23023#comment:2>

Django

unread,
Jul 16, 2014, 12:35:38 PM7/16/14
to django-...@googlegroups.com
#23023: Update warning about local-memory cache for sessions
-------------------------------------+-------------------------------------
Reporter: django@… | Owner: timo
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Documentation | Resolution: fixed
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"8e34bcdfba16cb1dc3096da57d1e82d3839472a8"]:
{{{
#!CommitTicketReference repository=""
revision="8e34bcdfba16cb1dc3096da57d1e82d3839472a8"
[1.7.x] Fixed #23023 -- Added warning against local-memory cache.

Thanks django at kerz.id.au.

Backport of 7d0519c725 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23023#comment:3>

Django

unread,
Jul 16, 2014, 12:35:40 PM7/16/14
to django-...@googlegroups.com
#23023: Update warning about local-memory cache for sessions
-------------------------------------+-------------------------------------
Reporter: django@… | Owner: timo
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Documentation | Resolution: fixed
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"21853c1b908f777de354b1371c17422f10032c70"]:
{{{
#!CommitTicketReference repository=""
revision="21853c1b908f777de354b1371c17422f10032c70"
[1.6.x] Fixed #23023 -- Added warning against local-memory cache.

Thanks django at kerz.id.au.

Backport of 7d0519c725 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23023#comment:4>

Reply all
Reply to author
Forward
0 new messages