chore: remove duplicate cache clearing

This commit is contained in:
Ankush Menat 2023-06-03 18:53:24 +05:30 committed by Ankush Menat
parent 339cbf208c
commit be1da0dd00
3 changed files with 1 additions and 4 deletions

View file

@ -1116,7 +1116,6 @@ def get_document_cache_key(doctype: str, name: str):
def clear_document_cache(doctype, name):
cache().hdel("last_modified", doctype)
cache().hdel("document_cache", get_document_cache_key(doctype, name))
if doctype == "System Settings" and hasattr(local, "system_settings"):

View file

@ -6,8 +6,7 @@ from frappe.model.document import Document
class ListViewSettings(Document):
def on_update(self):
frappe.clear_document_cache(self.doctype, self.name)
pass
@frappe.whitelist()

View file

@ -1207,7 +1207,6 @@ class Document(BaseDocument):
if notify:
self.notify_update()
self.clear_cache()
if commit:
frappe.db.commit()