def METHOD_NAME(ttl: int | None = None, maxsize: int | None = None) -> Callable:
	"""Decorator to cache method calls across requests. The cache is stored in
	frappe.utils.caching._SITE_CACHE. The cache persists on the parent process.
	It offers a light-weight cache for the current process without the additional
	overhead of serializing / deserializing Python objects.
	Note: This cache isn't shared among workers. If you need to share data across
	workers, use redis (frappe.cache API) instead.
	Usage:
	        from frappe.utils.caching import site_cache
	        @site_cache
	        def calculate_pi():
	                import math, time
	                precision = get_precision("Math Constant", "Pi") # depends on site data
	                return round(math.pi, precision)
	        calculate_pi(10) # will calculate value
	        calculate_pi(10) # will return value from cache
	        calculate_pi.clear_cache() # clear this function's cache for all sites
	        calculate_pi(10) # will calculate value
	"""
	def time_cache_wrapper(func: Callable = None) -> Callable:
		func_key = f"{func.__module__}.{func.__name__}"
		def clear_cache():
			"""Clear cache for this function for all sites if not specified."""
			_SITE_CACHE[func_key].clear()
		func.clear_cache = clear_cache
		if ttl is not None and not callable(ttl):
			func.ttl = ttl
			func.expiration = datetime.utcnow() + timedelta(seconds=func.ttl)
		if maxsize is not None and not callable(maxsize):
			func.maxsize = maxsize
		@wraps(func)
		def site_cache_wrapper(*args, **kwargs):
			if getattr(frappe.local, "initialised", None):
				func_call_key = json.dumps((args, kwargs))
				if hasattr(func, "ttl") and datetime.utcnow() >= func.expiration:
					func.clear_cache()
					func.expiration = datetime.utcnow() + timedelta(seconds=func.ttl)
				if hasattr(func, "maxsize") and len(_SITE_CACHE[func_key][frappe.local.site]) >= func.maxsize:
					_SITE_CACHE[func_key][frappe.local.site].pop(
						next(iter(_SITE_CACHE[func_key][frappe.local.site])), None
					)
				if func_call_key not in _SITE_CACHE[func_key][frappe.local.site]:
					_SITE_CACHE[func_key][frappe.local.site][func_call_key] = func(*args, **kwargs)
				return _SITE_CACHE[func_key][frappe.local.site][func_call_key]
			return func(*args, **kwargs)
		return site_cache_wrapper
	if callable(ttl):
		return time_cache_wrapper(ttl)
	return time_cache_wrapper