#17026: Message storage backends section missing "just use x"
--------------------------------------+------------------------------------
     Reporter:  coolRR                |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  reopened
    Component:  Documentation         |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by aaugustin):

 * status:  closed => reopened
 * version:  1.3 => master
 * resolution:  fixed =>


Comment:

 I came across this section of the docs today (while debugging #18781) and
 thought "oh, what are the advantages and drawbacks of the three storage
 backends?".

 So... I'd like to revisit this ticket.

 The backends were introduced in [25020ddb05] as a consequence of #4604.
 The discussion on the ticket is quite long but there's a good summary on
 the SessionMessages wiki page. Notably it mentions the following
 requirement:
 > Use the session only as a fallback: Avoid database/cache queries if
 possible, but support larger messages that don't fit in a cookie (> 4kb)
 when needed

 [[BR]]

 I think the docs should say something along the lines of:
 - !FallbackStorage optimizes for the general case by using cookies for
 small messages, and the session only when messages don't fit in a cookie.
 In general, there's no reason to use anything else.
 - if your site doesn't use `django.contrib.sessions`, use !CookieStorage
 - if you have a good reason to keep your cookies minimal (hint: you
 probably don't), use !SessionStorage

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17026#comment:3>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to