Skip to main content

add_never_cache_headers

Add headers to a response to indicate that a page should never be cached.

def add_never_cache_headers(
response: HttpResponse
) - > void

Add headers to a response to indicate that a page should never be cached.

Parameters

NameTypeDescription
responseHttpResponseThe HTTP response object to which the cache-prevention headers will be applied

Returns

TypeDescription
voidThe function modifies the response object in-place and does not return a value.