diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2019-04-19 13:46:28 +0000 |
|---|---|---|
| committer | Vincent Schippefilt <vsc@odoo.com> | 2019-05-22 07:52:07 +0000 |
| commit | b11b6bc902daeb354a5afafd801a6835eff81982 (patch) | |
| tree | c5d513dd1812962a61398aa87f96a91e7e93889f /addons | |
| parent | 8a28cc22fd242f5fb59f23d1443ed8ed438249d7 (diff) | |
[IMP] base: change cache busting middleware
In the HTTP pipeline, there is a middleware called DisableCacheMiddleware
that is called on every request to check if we are in debug mode, to remove
the cache headers and replace them with a static 'no-cache' so the browser
has to contact the server and check for a new version of every ressouce.
There were 2 problems with it:
1. it was doing more work than strictly needed when not in debug, like
rebuilding a list of headers for every request
2. it was removing Etag (case sensitive) with a typo and other headers
that could have been left in place.
This commit fixes those 2 issues by only modifying the headers if we are
in debug mode, and only removing the header 'cache-control' and replacing
it with 'cache-control: no-cache'
Diffstat (limited to 'addons')
0 files changed, 0 insertions, 0 deletions
