1313from django .core .handlers .wsgi import WSGIRequest
1414from django .http .response import HttpResponse
1515from django .template .response import SimpleTemplateResponse
16- from django .utils .cache import (cc_delim_re , get_cache_key , get_max_age ,
17- has_vary_header , learn_cache_key ,
18- patch_response_headers )
16+ from django .utils .cache import (
17+ cc_delim_re ,
18+ get_cache_key ,
19+ get_max_age ,
20+ has_vary_header ,
21+ learn_cache_key ,
22+ patch_response_headers ,
23+ )
1924from django .utils .deprecation import MiddlewareMixin
2025from wagtail import hooks
2126from wagtailcache .settings import wagtailcache_settings
@@ -421,7 +426,7 @@ def serve_password_required_response(self, request, form, action_url):
421426 """
422427 Add a cache-control header if the page requires a password.
423428 """
424- response = super ().serve_password_required_response (
429+ response = super ().serve_password_required_response ( # type: ignore
425430 request , form , action_url
426431 )
427432 response ["Cache-Control" ] = CacheControl .PRIVATE .value
@@ -432,8 +437,8 @@ def serve(self, request, *args, **kwargs):
432437 Add a custom cache-control header, or set to private if the page is
433438 being served behind a view restriction.
434439 """
435- response = super ().serve (request , * args , ** kwargs )
436- if self .get_view_restrictions ():
440+ response = super ().serve (request , * args , ** kwargs ) # type: ignore
441+ if self .get_view_restrictions (): # type: ignore
437442 response ["Cache-Control" ] = CacheControl .PRIVATE .value
438443 elif hasattr (self , "cache_control" ):
439444 if callable (self .cache_control ):
0 commit comments