Redundant Drive Detail Calls #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
_get_drive_details() is called multiple times for the same drive:
Line 1207 in ticket creation
Line 1418 in SMART check
Line 1286 in firmware check
Cache the results:
def init(self, ...):
# ...
self._drive_details_cache = {} # Add cache
def _get_drive_details(self, device: str) -> Dict[str, str]:
"""Get detailed drive information using smartctl (cached)."""
if device in self._drive_details_cache:
return self._drive_details_cache[device]