MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / is_valid

Method is_valid

apps/common/locale/cache.py:42–44  ·  view source on GitHub ↗

检查缓存是否有效

(self)

Source from the content-addressed store, hash-verified

40
41 @property
42 def is_valid(self) -> bool:
43 """检查缓存是否有效"""
44 return self._cache is not None and (time.time() - self._timestamp) < self._ttl
45
46
47# 全局缓存实例

Callers 15

insertMethod · 0.45
get_folder_treeMethod · 0.45
aggregationMethod · 0.45
aggregationMethod · 0.45
rankingMethod · 0.45
exportMethod · 0.45
rankingMethod · 0.45
exportMethod · 0.45
rankingMethod · 0.45
exportMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected