isFileWithIDCached Enhancement Request
- Dominant language
- Swift
- Stars
- 18
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
This function works as advertised, to the best of it's ability to.
As it works currently it properly indicates if a file relating to the ID provided exists within the cache. However, since the ID of the file does not change with file versioning a user of this SDK is unable to determine if a specific version of this file has been cached.
I was able to verify that internally the caching mechanism is taking the version into account, when it is given a BOXFile object with a different SHA-1 hash, it will trigger the download of that already cached file resulting in the latest version of it being stored locally.
It would be useful for the isFileWithIDCached to take the SHA-1 that way you could accurately anticipate which files need to be downloaded again to have their current versions available locally.
Contributor guide
Research direction
Locate isFileWithIDCached in the Swift SDK and read the related cache handling for BOXFile objects. Trace how the file version or SHA-1 is currently considered during downloads, then identify the relevant tests or add coverage for the requested behavior. Done means callers can determine whether the cached file matches the requested version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100