Add headers to a response to indicate that a page should never be cached.
(response)
| 288 | |
| 289 | |
| 290 | def add_never_cache_headers(response): |
| 291 | """ |
| 292 | Add headers to a response to indicate that a page should never be cached. |
| 293 | """ |
| 294 | patch_response_headers(response, cache_timeout=-1) |
| 295 | patch_cache_control( |
| 296 | response, no_cache=True, no_store=True, must_revalidate=True, private=True |
| 297 | ) |
| 298 | |
| 299 | |
| 300 | def patch_vary_headers(response, newheaders): |
no test coverage detected