diff --git a/erpnext/website/web_cache.py b/erpnext/website/web_cache.py index 01c8e2d602..141c83f6ad 100644 --- a/erpnext/website/web_cache.py +++ b/erpnext/website/web_cache.py @@ -223,7 +223,7 @@ def refresh_cache(build=None): """delete and re-create web cache entries""" import webnotes - webnotes.conn.sql("delete from `tabWeb Cache`") + # webnotes.conn.sql("delete from `tabWeb Cache`") query_map = { 'Web Page': """select page_name, name from `tabWeb Page` where docstatus=0""", @@ -239,9 +239,8 @@ def refresh_cache(build=None): for result in webnotes.conn.sql(query_map[dt], as_dict=1): create_cache(result['page_name'], dt, result['name']) clear_cache(result['page_name'], dt, result['name']) - if build and dt in build: load_into_cache(result['page_name']) for page_name in get_predefined_pages(): create_cache(page_name, None, None) clear_cache(page_name, None, None) - if build: load_into_cache(page_name) + if build: load_into_cache(page_name) \ No newline at end of file