MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / get

Method get

web/pgadmin/utils/session.py:238–261  ·  view source on GitHub ↗
(self, sid, digest)

Source from the content-addressed store, hash-verified

236 return self.parent.exists(sid)
237
238 def get(self, sid, digest):
239 session = None
240 with (sess_lock):
241 if sid in self._cache:
242 session = self._cache[sid]
243 if self.is_session_ready(session) and\
244 session.hmac_digest != digest:
245 session = None
246
247 # reset order in Dict
248 del self._cache[sid]
249
250 if not self.is_session_ready(session):
251 session = self.parent.get(sid, digest)
252
253 # Do not store the session if skip paths
254 for sp in self.skip_paths:
255 if request.path.startswith(sp):
256 return session
257
258 self._cache[sid] = session
259 self._normalize()
260
261 return session
262
263 def put(self, session):
264 with sess_lock:

Callers

nothing calls this directly

Calls 3

is_session_readyMethod · 0.95
_normalizeMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected