Cache-control decorator and s-maxage

79 views
Skip to first unread message

Tomasz Knapik

unread,
Jun 22, 2018, 2:01:54 PM6/22/18
to django-d...@googlegroups.com
Hi everyone,

I've been wondering what you think about making the cache-control
decorator do the same thing to s-maxage as it does to maxage, i.e. when
overriding the maxage value it chooses the lower value [1]. I can't see
why not since they're both included in the spec [2], but would want to
check whether there's an issue in just filing a ticket/patch.

s-maxage is quite useful when you want to set a different expiration
for the shared and browser's cache. I would have assumed it's commonly
used in web development so it'd make sense to have it in a web
framework, especially if maxage is supported.

Tomasz

[1]: https://github.com/django/django/blob/02cd16a7a04529c726e5bb5a13d5
979119f25c7d/django/utils/cache.py#L68-L72
[2]: https://tools.ietf.org/html/rfc7234#section-5.2.2.9

Adam Johnson

unread,
Jun 25, 2018, 6:33:46 PM6/25/18
to django-d...@googlegroups.com
Seems like a fairly straightforward, inoffensive change to me! Make a ticket and let me know, I'll help review

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/484f8c0fb35a33d939b072e04e81fd7b8992b437.camel%40tmkn.org.
For more options, visit https://groups.google.com/d/optout.


--
Adam
Reply all
Reply to author
Forward
0 new messages