MCPcopy Create free account
hub / github.com/brokermr810/QuantDinger / set

Method set

backend_api_python/app/utils/cache.py:111–116  ·  view source on GitHub ↗

设置缓存

(self, key: str, value: Any, ttl: int = 300)

Source from the content-addressed store, hash-verified

109 return None
110
111 def set(self, key: str, value: Any, ttl: int = 300):
112 """设置缓存"""
113 try:
114 self._client.setex(key, ttl, json.dumps(value))
115 except Exception as e:
116 logger.error(f"Cache write failed: {e}")
117
118 def delete(self, key: str):
119 """删除缓存"""

Callers 7

_runFunction · 0.45
_inject_timeoutFunction · 0.45
_publish_progressFunction · 0.45
connectFunction · 0.45
connectFunction · 0.45
_fake_publishFunction · 0.45

Calls 2

setexMethod · 0.80
dumpsMethod · 0.80

Tested by 1

_fake_publishFunction · 0.36