Commit Graph
4 Commits
Author SHA1 Message Date
Jacob RakidzichandAntonio Pallares f033ddc398 Fix Crashes: Move large object cacheing off of user defaults to file storage (#5652)
* move device cache to file cache for potentially large data sets

* Fix vibe coded implementation and test it

* Update device cache tests

* bring back some of the old functionality

* revert accidental deletion

* use the static variable

* be kind and clean up after your(my)self.

* Move from caches to docs dir

* simplify cache by returning the decoded object

* remove update function and scope read and write to internal functions

* Potential fix for CI issues?

* fix tests

* Update Sources/Caching/DeviceCache.swift

Co-authored-by: Antonio Pallares <ajpallares@users.noreply.github.com>

* Update Sources/Caching/DeviceCache.swift

Co-authored-by: Antonio Pallares <ajpallares@users.noreply.github.com>

* scope adjustment

* requested changes

* fix test

---------

Co-authored-by: Antonio Pallares <ajpallares@users.noreply.github.com>
2025-11-18 10:02:28 -06:00
Jacob Rakidzich 04bc10266b Finalize video component to include a checksum, dark mode support, and optimize memory usage for large file downloads (#5631)
* Checksum and tests

* add checksum to video component models

* Update cache warming

* put the checksum in the right spot and update the view model

* File repo updates

* add missing assertion

* revert accidental trailiing comma

* Checksum from file

* Ensure cache invalidates when the checksum changes

* Use checksum as filename if available

* greedily fill space while loading occurs

* update remote image usage of the repository

* Reduce memory footprint of large file downloads by streaming the download to a temp file

* Update keyed deferred value storage key to include checksum

* remove unused argument

* remove wip comment

* Get tests to compile

* Write tests for the large item cache type

* remove test from the file repository suite

* trailing commas

* remove cache warming of videos

* remove un-needed change causing existential types

* delete the temporary file after success or failure of the code block

* log with the checksums

* optimize checksum generation to occur at the same time as the temp file storage

* starting to work on border gradients,

* Revert "starting to work on border gradients,"

This reverts commit 429e6d2fab.

* clarity regarding dark mode urls
2025-10-14 08:05:01 -05:00
Jacob Rakidzich 6c8140e058 Fix the tests and implicit returns that broke our CI on main (#5493)
* explicit returns

* wrap prefetch in high priority task to ensure yield picks things up.

* more explicit returns

* explicit self in closure
2025-08-21 22:05:35 -05:00
Jacob Rakidzich f730d9df52 Create File Repository for use in upcoming feature work (#5477)
* Pull files from staging branch to introduce a file repository and intelligent task sharing

* removed typed throws and fix some docs

* Make tests satisfy predictive swift 6 failures

* @_spi(Internal) public

* Stop using the shared instance in an instance method

* Pull cache directory logic out of file repository

* update cache naming conventions

* @fire-at-will feedback -> use url instead of path

* Use strings file pattern

* remove priority from repository

* Remove RC Internal access from keyed deferred value store

* Remove spi internal from cache and network service

* makeSUT -> makeSystemUnderTest

* remove public scope in extensions

* rename function for clarity
2025-08-21 05:41:52 -05:00