Django cache middleware does not set "Age" header as described in rfc2616
|Reported by:||corentin.chary@…||Owned by:||nobody|
|Component:||Core (Cache system)||Version:||master|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Django cache middleware set "Cache-Control: max-age=" and "Expires", but does not set "Age".
This can be an issue, because "max-age" in frozen, so you can only rely on "Expires" for expiration time. Having the "Age" header set would allow the client to now when this page was cached by django.
This feature would require adding a cache.age(key) function in all cache backends, which is far from trival, especially with backends such as memcached.