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]
drive_details = { # ... existing code ... }
# Cache the result
self._drive_details_cache[device] = drive_details
return drive_details
_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]
drive_details = { # ... existing code ... }
# Cache the result
self._drive_details_cache[device] = drive_details
return drive_details
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
_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]