Renamed varnish_url variable to cache_serve_url

This commit is contained in:
Karl Hobley 2014-06-30 13:49:46 +01:00
parent 341f535116
commit 23a85311fa

View file

@ -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():