diff --git a/frappe/database/database.py b/frappe/database/database.py index 84f9c74790..ea082652f7 100644 --- a/frappe/database/database.py +++ b/frappe/database/database.py @@ -464,7 +464,7 @@ class Database: @staticmethod def clear_db_table_cache(query): if query and is_query_type(query, ("drop", "create")): - frappe.cache.delete_key("db_tables") + frappe.client_cache.delete_value("db_tables") def get_description(self): """Return result metadata.""" diff --git a/frappe/database/mariadb/database.py b/frappe/database/mariadb/database.py index c96bcb3e0a..ee4d1d6e24 100644 --- a/frappe/database/mariadb/database.py +++ b/frappe/database/mariadb/database.py @@ -458,7 +458,7 @@ class MariaDBDatabase(MariaDBConnectionUtil, MariaDBExceptionUtil, Database): to_query = not cached if cached: - tables = frappe.cache.get_value("db_tables") + tables = frappe.client_cache.get_value("db_tables") to_query = not tables if to_query: @@ -470,7 +470,7 @@ class MariaDBDatabase(MariaDBConnectionUtil, MariaDBExceptionUtil, Database): .where(information_schema.tables.table_schema == frappe.db.cur_db_name) .run(pluck=True) ) - frappe.cache.set_value("db_tables", tables) + frappe.client_cache.set_value("db_tables", tables) return tables