if result is `[]` then it ignores cache and keeps hitting DB for no reason. (cherry picked from commit 20b63f3252f9b23655e34ca830cff426ad5a50a3) Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
parent
8e273d6701
commit
5d270b9f67
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ class Workspace:
|
|||
|
||||
def get_cached(self, cache_key, fallback_fn):
|
||||
value = frappe.cache.get_value(cache_key, user=frappe.session.user)
|
||||
if value:
|
||||
if value is not None:
|
||||
return value
|
||||
|
||||
value = fallback_fn()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue