fix: use site_cache as clear_cache is broken for redis_cache
This commit is contained in:
parent
d618a88f01
commit
65965b9c44
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue