#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.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/060.bde495a71d60f577d353d35d225247cb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.