refactor(boot): frappe.cache() -> frappe.cache

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2024-02-01 13:25:51 +05:30
parent 7dddc9e4f1
commit 886d4ffc25
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -450,12 +450,12 @@ def get_marketplace_apps():
return request.json()["message"]
try:
apps = frappe.cache().get_value(cache_key, get_apps_from_fc, shared=True)
apps = frappe.cache.get_value(cache_key, get_apps_from_fc, shared=True)
installed_apps = set(frappe.get_installed_apps())
apps = [app for app in apps if app["name"] not in installed_apps]
except Exception:
# Don't retry for a day
frappe.cache().set_value(cache_key, apps, shared=True, expires_in_sec=24 * 60 * 60)
frappe.cache.set_value(cache_key, apps, shared=True, expires_in_sec=24 * 60 * 60)
return apps