Make clearModelCache also empty the OPFS model store in Elffuss Code #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In web/js/model-cache.js,
clearModelCacheclears only the Cache Storage cache namedelffuss-models-v1. The sibling app already also callsclearAllof./runtime/model-store.jsbecause weights in the OPFS store were never freed, so the Settings button looked broken: usage did not go down. Why it matters: The button exists to free space; if the larger store is left untouched, the user sees no change and loses trust in the control.Proposal
After clearing Cache Storage, import
./runtime/model-store.jsand await itsclearAll, inside a try block so a missing store does not make the button fail.Acceptance criteria
clearModelCache()resolves,clearAllof./runtime/model-store.jshas been called exactly once.clearModelCache()resolves without throwing whenclearAllrejects.clearModelCache()still deletes the Cache Storage cache namedelffuss-models-v1.Files
web/js/model-cache.jsT2T-Issue: 0x8565fcd82db1b9b10968a7870fd214de03dc20264bad61589532ace018f5a403
Number: 2
Kind: bug
Origin: imported
Proposer: 0x08809b42d05ae9526f4aa4c9670ce168aac68919
Ledger: elffuss/ledger, event 97