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

Method set

cache/redis_cache.py:67–75  ·  view source on GitHub ↗

Set the value of a key in the cache and serialize it :param key: :param value: :param expire_time: :return:

(self, key: str, value: Any, expire_time: int)

Source from the content-addressed store, hash-verified

65 return pickle.loads(value)
66
67 def set(self, key: str, value: Any, expire_time: int) -> None:
68 """
69 Set the value of a key in the cache and serialize it
70 :param key:
71 :param value:
72 :param expire_time:
73 :return:
74 """
75 self._redis_client.set(key, pickle.dumps(value), ex=expire_time)
76
77 def keys(self, pattern: str) -> List[str]:
78 """

Callers 15

receive_sms_notificationFunction · 0.45
redis_cache.pyFile · 0.45
set_ipMethod · 0.45
test_set_and_getMethod · 0.45
test_expired_keyMethod · 0.45
test_keysMethod · 0.45
test_set_and_getMethod · 0.45
test_expired_keyMethod · 0.45
test_clearMethod · 0.45
startMethod · 0.45
searchMethod · 0.45
startMethod · 0.45

Calls

no outgoing calls

Tested by 6

test_set_and_getMethod · 0.36
test_expired_keyMethod · 0.36
test_keysMethod · 0.36
test_set_and_getMethod · 0.36
test_expired_keyMethod · 0.36
test_clearMethod · 0.36