MCPcopy
hub / github.com/NanmiCoder/MediaCrawler / get

Method get

cache/redis_cache.py:56–65  ·  view source on GitHub ↗

Get the value of a key from the cache and deserialize it :param key: :return:

(self, key: str)

Source from the content-addressed store, hash-verified

54 )
55
56 def get(self, key: str) -> Any:
57 """
58 Get the value of a key from the cache and deserialize it
59 :param key:
60 :return:
61 """
62 value = self._redis_client.get(key)
63 if value is None:
64 return None
65 return pickle.loads(value)
66
67 def set(self, key: str, value: Any, expire_time: int) -> None:
68 """

Callers 15

create_crawlerMethod · 0.45
redis_cache.pyFile · 0.45
check_is_img_pathMethod · 0.45
find_login_qrcodeFunction · 0.45
convert_cookiesFunction · 0.45
_write_rowMethod · 0.45
store_contentMethod · 0.45
store_commentMethod · 0.45
store_creatorMethod · 0.45

Calls

no outgoing calls

Tested by 15

print_diffFunction · 0.36
sync_databaseFunction · 0.36
test_set_and_getMethod · 0.36
test_expired_keyMethod · 0.36
test_set_and_getMethod · 0.36
test_expired_keyMethod · 0.36
test_clearMethod · 0.36
testMethod · 0.36
test_convert_cookiesFunction · 0.36