fix: clear cache using client_cache (#31420)

It's faster than relying on indirect invalidations. This was avoided
before only because delete_keys didn't exist on client_cache.
This commit is contained in:
Ankush Menat 2025-02-25 12:13:39 +05:30 committed by GitHub
parent 6bbbc916d5
commit 7721fdb054
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -95,7 +95,7 @@ def get_meta(doctype: str | dict | DocRef, cached=True) -> "_Meta":
def clear_meta_cache(doctype: str = "*"):
key = f"doctype_meta::{doctype}"
if doctype == "*":
frappe.cache.delete_keys(key)
frappe.client_cache.delete_keys(key)
else:
frappe.client_cache.delete_value(key)