Does Arduino IDE 2.x automatically expire its package index cache after a set interval?
0 reputation · 11 Sept 2022, 22:01 UTC
Cache behavior in Arduino IDE
The Arduino IDE (both 1.8.x and 2.x) caches package_index.json and library_index.json locally under the Arduino15 directory, reusing them until manually deleted or refreshed via the Board Manager's "Update Index" action. There is no documented time-to-live (TTL) for these caches, nor does the GUI expose a "Clear Cache" button; users must locate and delete the cache files manually, which varies by operating system.
Observed symptoms of stale cache
- Board Manager shows outdated board package versions
- Library Manager lists obsolete library versions
- Signature verification failures when upstream metadata changes
- "Library not found" errors after successful installation
The CLI provides arduino-cli core update-index and arduino-cli lib update-index to force a refresh, but these are not discoverable from the IDE. Third-party board managers (e.g., ESP32, STM32) host their own package indexes with independent update cadences, and corporate HTTP proxies may add another caching layer.
Open questions
- Does the IDE or CLI implement any automatic cache expiry (e.g., a 24-hour TTL) for
package_index.jsonorlibrary_index.json? - Is there a planned GUI action to clear all caches without manual filesystem access?
- Do the HTTP requests for package indexes use ETag or If-Modified-Since headers to support conditional GET and cache-busting?