MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / get_cached_session

Function get_cached_session

ui/easydiffusion/task_manager.py:329–336  ·  view source on GitHub ↗
(session_id: str, update_ttl: bool = False)

Source from the content-addressed store, hash-verified

327
328
329def get_cached_session(session_id: str, update_ttl: bool = False):
330 if update_ttl:
331 session_cache.keep(session_id, TASK_TTL)
332 session = session_cache.tryGet(session_id)
333 if not session:
334 session = SessionState(session_id)
335 session_cache.put(session_id, session, TASK_TTL)
336 return session
337
338
339def get_devices():

Callers 1

enqueue_taskFunction · 0.85

Calls 4

SessionStateClass · 0.85
keepMethod · 0.80
tryGetMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected