clear cache in website

This commit is contained in:
Rushabh Mehta
2012-12-27 18:57:03 +05:30
parent cd71c308a7
commit 0357f1409c
7 changed files with 40 additions and 9 deletions

View File

@@ -32,11 +32,13 @@ class DocType(DocTypeNestedSet):
# webpage updates
from website.utils import update_page_name
page_name = self.doc.name
if webnotes.conn.get_value("Website Settings", None,
if webnotes.conn.get_value("Product Settings", None,
"default_product_category")==self.doc.name:
page_name = "products"
from website.utils import clear_cache
clear_cache()
update_page_name(self.doc, self.doc.name)
update_page_name(self.doc, page_name)
from website.helpers.product import invalidate_cache_for
invalidate_cache_for(self.doc.name)

View File

@@ -4,7 +4,7 @@
"docstatus": 0,
"creation": "2012-12-07 15:15:28",
"modified_by": "Administrator",
"modified": "2012-12-27 10:38:02"
"modified": "2012-12-27 18:50:20"
},
{
"in_create": 1,
@@ -52,6 +52,7 @@
"reqd": 1
},
{
"read_only": 1,
"doctype": "DocField",
"label": "Page Name",
"fieldname": "page_name",