MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / CacheEntry

Class CacheEntry

core/cache.py:18–33  ·  view source on GitHub ↗

Cached scan result.

Source from the content-addressed store, hash-verified

16
17
18class CacheEntry(BaseModel):
19 """Cached scan result."""
20 target: str
21 modules: list[str]
22 result_data: dict
23 created_at: datetime
24 expires_at: datetime
25 checksum: str
26
27 def is_expired(self) -> bool:
28 """Check if cache entry has expired."""
29 return datetime.now(timezone.utc) >= self.expires_at
30
31 def __hash__(self) -> str:
32 """Get cache entry hash."""
33 return self.checksum
34
35
36class ScanCache:

Callers 4

getMethod · 0.85
setMethod · 0.85
cleanup_expiredMethod · 0.85

Calls

no outgoing calls

Tested by 1