diff --git a/wagtail/contrib/wagtailfrontendcache/utils.py b/wagtail/contrib/wagtailfrontendcache/utils.py index 9737ebbb0..b95ed7e95 100644 --- a/wagtail/contrib/wagtailfrontendcache/utils.py +++ b/wagtail/contrib/wagtailfrontendcache/utils.py @@ -26,9 +26,9 @@ class CustomHTTPAdapter(HTTPAdapter): def purge_page_from_cache(page): # Get session - varnish_url = getattr(settings, 'WAGTAILFRONTENDCACHE_LOCATION', 'http://127.0.0.1:8000/') + cache_server_url = getattr(settings, 'WAGTAILFRONTENDCACHE_LOCATION', 'http://127.0.0.1:8000/') session = requests.Session() - session.mount('http://', CustomHTTPAdapter(varnish_url)) + session.mount('http://', CustomHTTPAdapter(cache_server_url)) # Purge paths from cache for path in page.get_cached_paths():