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

Method _normalize

web/pgadmin/utils/session.py:194–199  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

192 self.skip_paths = [] if skip_paths is None else skip_paths
193
194 def _normalize(self):
195 if len(self._cache) > self.num_to_store:
196 # Flush 20% of the cache
197 with sess_lock:
198 while len(self._cache) > (self.num_to_store * 0.8):
199 self._cache.popitem(False)
200
201 def is_session_ready(self, _session):
202 if not has_request_context() or _session is None:

Callers 3

new_sessionMethod · 0.95
getMethod · 0.95
putMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected