Skip to content

feat(utils): expose resource cache path utility - #1592

Open
barhanc wants to merge 1 commit into
mainfrom
feat/resource-cache-path-utils
Open

barhanc wants to merge 1 commit into
mainfrom
feat/resource-cache-path-utils

Conversation

@barhanc

@barhanc barhanc commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Description

Expose getResourceCachePath(source) from the fetcher through utils.ts, allowing apps to locate cached resources without duplicating cache naming logic. The helper performs no downloads or existence checks and preserves repository aliases and platform-specific paths.

Adds regression tests for cache identity, query parameters, local paths, and agreement with the downloader.

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

Tested in local dev branch of the gallery app.

  • iOS
  • Android

Testing instructions

  • Tests pass

Screenshots

Related issues

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@barhanc barhanc self-assigned this Oct 29, 2026
@barhanc barhanc added the feature PRs that implement a new feature label Oct 29, 2026
@barhanc
barhanc requested a review from msluszniak October 29, 2026 17:25
@msluszniak

Copy link
Copy Markdown
Member

getResourceCachePath('file:///x.pte') returns /x.pte, but download returns file:///x.pte unchanged, so they only agree for remote URLs. Either pass local paths through as-is or say so in the doc comment. Other than that worked as expected.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature PRs that implement a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants