MCPcopy Create free account
hub / github.com/FastLED/FastLED / _is_framework_cached

Method _is_framework_cached

ci/compiler/platformio_ini.py:1546–1559  ·  view source on GitHub ↗

Check if framework resolution is cached and still valid.

(self, framework_name: str)

Source from the content-addressed store, hash-verified

1544 return age < timedelta(hours=resolution.ttl_hours)
1545
1546 def _is_framework_cached(self, framework_name: str) -> bool:
1547 """Check if framework resolution is cached and still valid."""
1548 if not hasattr(self, "_framework_cache"):
1549 self._framework_cache: dict[str, FrameworkResolution] = {}
1550
1551 if framework_name not in self._framework_cache:
1552 return False
1553
1554 resolution = self._framework_cache[framework_name]
1555 if not resolution.resolved_at:
1556 return False
1557
1558 age = datetime.now() - resolution.resolved_at
1559 return age < timedelta(hours=resolution.ttl_hours)
1560
1561 def _run_pio_command(
1562 self, args: list[str]

Callers 2

resolve_framework_urlMethod · 0.95

Calls 1

nowMethod · 0.45

Tested by

no test coverage detected