예제 #1
0
파일: render.py 프로젝트: erpnext-tm/frappe
def clear_cache(path=None):
	"""Clear website caches

	:param path: (optional) for the given path"""
	for key in ("website_generator_routes", "website_pages", "website_full_index", "sitemap_routes"):
		frappe.cache().delete_value(key)

	frappe.cache().delete_value("website_404")
	if path:
		frappe.cache().hdel("website_redirects", path)
		delete_page_cache(path)
	else:
		clear_sitemap()
		frappe.clear_cache("Guest")
		for key in (
			"portal_menu_items",
			"home_page",
			"website_route_rules",
			"doctypes_with_web_view",
			"website_redirects",
			"page_context",
			"website_page",
		):
			frappe.cache().delete_value(key)

	for method in frappe.get_hooks("website_clear_cache"):
		frappe.get_attr(method)(path)
예제 #2
0
def clear_cache(path=None):
	frappe.cache().delete_value("website_generator_routes")
	delete_page_cache(path)
	if not path:
		clear_sitemap()
		frappe.clear_cache("Guest")
		frappe.cache().delete_value("_website_pages")

	for method in frappe.get_hooks("website_clear_cache"):
		frappe.get_attr(method)(path)
예제 #3
0
def clear_cache(path=None):
    if path:
        delete_page_cache(path)
    else:
        clear_sitemap()
        frappe.clear_cache("Guest")
        frappe.cache().delete_value("_website_pages")

    for method in frappe.get_hooks("website_clear_cache"):
        frappe.get_attr(method)(path)
예제 #4
0
파일: render.py 프로젝트: aambernath/frappe
def clear_cache(path=None):
	if path:
		delete_page_cache(path)
	else:
		clear_sitemap()
		frappe.clear_cache("Guest")
		frappe.cache().delete_value("_website_pages")
		clear_permissions()

	for method in frappe.get_hooks("website_clear_cache"):
		frappe.get_attr(method)(path)
예제 #5
0
def clear_cache(path=None):
    '''Clear website caches

	:param path: (optional) for the given path'''
    frappe.cache().delete_value("website_generator_routes")
    delete_page_cache(path)
    frappe.cache().delete_value("website_404")
    if not path:
        clear_sitemap()
        frappe.clear_cache("Guest")
        for key in ('portal_menu_items', 'home_page', 'website_route_rules',
                    'doctypes_with_web_view'):
            frappe.cache().delete_value(key)

    for method in frappe.get_hooks("website_clear_cache"):
        frappe.get_attr(method)(path)
예제 #6
0
파일: render.py 프로젝트: kickapoo/frappe
def clear_cache(path=None):
	'''Clear website caches

	:param path: (optional) for the given path'''
	for key in ('website_generator_routes', 'website_pages',
		'website_full_index'):
		frappe.cache().delete_value(key)
	delete_page_cache(path)
	frappe.cache().delete_value("website_404")
	if not path:
		clear_sitemap()
		frappe.clear_cache("Guest")
		for key in ('portal_menu_items', 'home_page', 'website_route_rules',
			'doctypes_with_web_view'):
			frappe.cache().delete_value(key)

	for method in frappe.get_hooks("website_clear_cache"):
		frappe.get_attr(method)(path)
예제 #7
0
파일: render.py 프로젝트: rvpasari/frappe
def clear_cache(path=None):
    '''Clear website caches

	:param path: (optional) for the given path'''
    for key in ('website_generator_routes', 'website_pages',
                'website_full_index'):
        frappe.cache().delete_value(key)

    frappe.cache().delete_value("website_404")
    if path:
        frappe.cache().hdel('website_redirects', path)
        delete_page_cache(path)
    else:
        clear_sitemap()
        frappe.clear_cache("Guest")
        for key in ('portal_menu_items', 'home_page', 'website_route_rules',
                    'doctypes_with_web_view', 'website_redirects',
                    'page_context', 'website_page'):
            frappe.cache().delete_value(key)

    for method in frappe.get_hooks("website_clear_cache"):
        frappe.get_attr(method)(path)