#25782: Discourage usage of cache_page decorator with UpdateCacheMiddleware (or
make middleware ignore decorated views)
-------------------------------------+-------------------------------------
     Reporter:  Serhiy               |                    Owner:  Wassef
         Type:                       |  Ben Ahmed
  Cleanup/optimization               |                   Status:  assigned
    Component:  Documentation        |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Wassef Ben Ahmed):

 Its not necessary to have UpdateCacheMiddleware on top, it's only a
 workaround suggested by ticket-15855, but let's question it?
 as without FetchFromCacheMiddleware, the UpdateCacheMiddleware will be
 just setting the value to some cache with the correct headers but not
 actually serving them as the value by this decorator will be the one
 served... so the workaround just causes this problem and fixes nothing.

 with this PR, will avoid that unnecessary extra write in the middleware,
 and continue having “Vary headers“ missing.

 on the other hand I think the "vary header" problem is smaller to have
 compared to doubling cache size so we should proceed with this until
 someone gathers the courage to deprecate the decorator?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/25782#comment:11>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070191845ffadb-546ac2e2-884d-42ca-8cf7-cc7cfb8f9cb0-000000%40eu-central-1.amazonses.com.

Reply via email to