Opened 4 years ago
Last modified 4 years ago
#32212 closed Uncategorized
Vary header changed by SessionMiddleware — at Initial Version
Description ¶
To specify the cache mode, i use the view decorator like this:
@vary_on_headers('Accept', 'Accept-Language', 'Origin', 'User-Agent') @cache_control(public=True, max_age=3600)
But after tracing, I found that SessionMiddleware modified the Vary Header and added a Cookie, as follows:
if accessed: patch_vary_headers(response, ('Cookie',))
Causes cache invalidation after user login again.
I have specified the cache as public, in which case the cache scheme should have nothing to do with cookies.
Note:
See TracTickets
for help on using tickets.