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

Method _save_cache

ci/fingerprint/core.py:107–121  ·  view source on GitHub ↗

Save current cache state to JSON file.

(self)

Source from the content-addressed store, hash-verified

105 return {}
106
107 def _save_cache(self) -> None:
108 """Save current cache state to JSON file."""
109 # Ensure cache directory exists
110 self.cache_file.parent.mkdir(parents=True, exist_ok=True)
111
112 # Convert CacheEntry objects to JSON-serializable dict
113 data = {}
114 for file_path, entry in self.cache.items():
115 data[file_path] = {
116 "modification_time": entry.modification_time,
117 "md5_hash": entry.md5_hash,
118 }
119
120 with open(self.cache_file, "w") as f:
121 json.dump(data, f, indent=2)
122
123 def _compute_md5(self, file_path: Path) -> str:
124 """

Callers 2

_update_cache_entryMethod · 0.95
remove_deleted_filesMethod · 0.95

Calls 2

itemsMethod · 0.80
dumpMethod · 0.45

Tested by

no test coverage detected