From 65965b9c44d654d2e904267495f39b1e5050b75b Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Sun, 19 Apr 2026 18:49:31 +0530 Subject: [PATCH] fix: use `site_cache` as `clear_cache` is broken for `redis_cache` --- frappe/concurrency_limiter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/concurrency_limiter.py b/frappe/concurrency_limiter.py index 6ae0f2d49c..fbaaf41b1a 100644 --- a/frappe/concurrency_limiter.py +++ b/frappe/concurrency_limiter.py @@ -23,13 +23,13 @@ from functools import wraps import frappe from frappe.exceptions import ServiceUnavailableError from frappe.utils import cint -from frappe.utils.caching import redis_cache +from frappe.utils.caching import site_cache # Default wait timeout (seconds) before returning 503 to the caller. _DEFAULT_WAIT_TIMEOUT = 10 -@redis_cache(shared=True) +@site_cache(ttl=3600) def _default_limit() -> int: """Derive a sensible default concurrency limit from gunicorn's max concurrency.""" return max(1, gunicorn_max_concurrency() // 2)