Skip to content

Cache app icons in memory and on disk - #14

Merged
eagleoflqj merged 1 commit into
mainfrom
cache-app-icons
Nov 5, 2026
Merged

eagleoflqj merged 1 commit into
mainfrom
cache-app-icons

Conversation

@eagleoflqj

Copy link
Copy Markdown
Member

App cards and detail sheets now share an icon cache, avoiding repeated downloads and retaining icons across app restarts. Cache entries use the release asset URL and recipe revision so a new build gets a fresh icon while catalog metadata changes reuse existing entries.

Decoded images use a 32 MiB NSCache target and a maximum edge of 256 pixels. Original image bytes use a 64 MiB disk LRU cache. Matching requests share a task, with at most four concurrent downloads; canceled views discard results without canceling other callers. Corrupt disk entries are fetched again, and persistence failures do not hide valid images.

Document both icon and existing index.json caching policies in docs/cache.md.

Validation:

  • Release and Debug builds passed; all 14 Release tests and the Debug preview-scenario test passed.
  • Strict swift-format and git diff whitespace checks passed; localization extraction left translations unchanged.
  • Downloaded all 16 published icons through the cache, then verified all 16 in a fresh process with networking disabled.
  • Verified native card and detail icon rendering from empty and warm disk caches.

@eagleoflqj
eagleoflqj merged commit c86ed2b into main Nov 5, 2026
2 checks passed
@eagleoflqj
eagleoflqj deleted the cache-app-icons branch November 5, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant