MCPcopy Create free account
hub / github.com/Freedium-cfd/web / query_get

Method query_get

medium-parser/medium_parser/core.py:148–157  ·  view source on GitHub ↗
(self, post_id: str, use_cache: bool, force_cache: bool = False)

Source from the content-addressed store, hash-verified

146 return None
147
148 async def query_get(self, post_id: str, use_cache: bool, force_cache: bool = False):
149 cache_used = True
150 post_data = await self.get_post_data_from_cache(post_id) if use_cache else None
151
152 if not post_data and not force_cache:
153 logger.debug("Getting value from cache failed, using API")
154 cache_used = False
155 post_data = await self.get_post_data_from_api(post_id)
156
157 return post_data, cache_used
158
159 async def query(
160 self,

Callers 1

queryMethod · 0.95

Calls 2

Tested by

no test coverage detected