perf: Cache is_virtual_doctype with maxsize 128
This commit is contained in:
parent
f03a7162ed
commit
9c02205fc1
1 changed files with 2 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ from frappe.model import child_table_fields, default_fields, optional_fields
|
|||
from frappe.model.base_document import get_controller
|
||||
from frappe.model.db_query import DatabaseQuery
|
||||
from frappe.utils import add_user_info, cstr, format_duration
|
||||
from frappe.utils.caching import site_cache
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
@ -733,5 +734,6 @@ def get_filters_cond(
|
|||
return cond
|
||||
|
||||
|
||||
@site_cache(maxsize=128)
|
||||
def is_virtual_doctype(doctype):
|
||||
return frappe.db.get_value("DocType", doctype, "is_virtual")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue