Skip to content

Commit

Permalink
chore: remove unused cache=True
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Dec 6, 2023
1 parent 525f656 commit 6a47a2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/startup/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ def update_page_info(bootinfo):
def bootinfo(bootinfo):
if bootinfo.get("user") and bootinfo["user"].get("name"):
bootinfo["user"]["employee"] = ""
employee = frappe.db.get_value("Employee", {"user_id": bootinfo["user"]["name"]}, "name", cache=True)
employee = frappe.db.get_value("Employee", {"user_id": bootinfo["user"]["name"]}, "name")
if employee:
bootinfo["user"]["employee"] = employee

2 comments on commit 6a47a2c

@casesolved-co-uk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we discussed this isn't used, but why remove it? If the framework changes in the future to cache this type of filtered lookup, this will be missed.

@ankush
Copy link
Member Author

@ankush ankush commented on 6a47a2c Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it to fix formatting at first but then felt it was redundant anyway so removed it.

It's unlikely to efficiently implement cache keys for filters.

Also, full bootinfo gets cached (?)

Please sign in to comment.