MCPcopy Create free account
hub / github.com/EasyIME/PIME / _get_cached_version

Method _get_cached_version

python/python3/tornado/web.py:3018–3030  ·  view source on GitHub ↗
(cls, abs_path: str)

Source from the content-addressed store, hash-verified

3016
3017 @classmethod
3018 def _get_cached_version(cls, abs_path: str) -> Optional[str]:
3019 with cls._lock:
3020 hashes = cls._static_hashes
3021 if abs_path not in hashes:
3022 try:
3023 hashes[abs_path] = cls.get_content_version(abs_path)
3024 except Exception:
3025 gen_log.error("Could not open static file %r", abs_path)
3026 hashes[abs_path] = None
3027 hsh = hashes.get(abs_path)
3028 if hsh:
3029 return hsh
3030 return None
3031
3032
3033class FallbackHandler(RequestHandler):

Callers 2

compute_etagMethod · 0.95
get_versionMethod · 0.80

Calls 3

get_content_versionMethod · 0.80
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected