MCPcopy Index your code
hub / github.com/masterking32/MasterHttpRelayVPN / get

Method get

src/proxy/proxy_support.py:196–208  ·  view source on GitHub ↗
(self, url: str)

Source from the content-addressed store, hash-verified

194 self.misses = 0
195
196 def get(self, url: str) -> bytes | None:
197 entry = self._store.get(url)
198 if not entry:
199 self.misses += 1
200 return None
201 raw, expires = entry
202 if time.time() > expires:
203 self._size -= len(raw)
204 del self._store[url]
205 self.misses += 1
206 return None
207 self.hits += 1
208 return raw
209
210 def put(self, url: str, raw_response: bytes, ttl: int = 300):
211 size = len(raw_response)

Callers 15

_cFunction · 0.80
configure_networkFunction · 0.80
parse_argsFunction · 0.80
mainFunction · 0.80
handlerFunction · 0.80
fetchFunction · 0.80
do_POSTMethod · 0.80
mainFunction · 0.80
_install_firefoxFunction · 0.80
_uninstall_firefoxFunction · 0.80
_supports_colorFunction · 0.80
_fmt_levelMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected