MCPcopy Create free account
hub / github.com/plotly/dash / _is_session_stale

Function _is_session_stale

dash/mcp/_server.py:70–78  ·  view source on GitHub ↗

True when the client's session doesn't match or the hash changed.

(client_session_id: str | None)

Source from the content-addressed store, hash-verified

68 _session_id: str = _get_or_create_session_id()
69
70 def _is_session_stale(client_session_id: str | None) -> bool:
71 """True when the client's session doesn't match or the hash changed."""
72 if client_session_id != _session_id:
73 return True
74 # pylint: disable=protected-access
75 reload_hash = app._hot_reload.hash
76 if reload_hash is None:
77 return False
78 return reload_hash != _session_id
79
80 # -- Streamable HTTP endpoint --------------------------------------------
81

Callers 1

_check_sessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…