Skip to content

Promote to production: OCR model cache fix + voice cache indicator - #107

Merged
slaveofcode merged 2 commits into
mainfrom
develop
Aug 1, 2026
Merged

Promote to production: OCR model cache fix + voice cache indicator#107
slaveofcode merged 2 commits into
mainfrom
develop

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Promotes #106: stop the PaddleOCR model re-downloading on refresh (add githubusercontent hosts to the SW CacheFirst rule) and add an honest cache indicator to Voice-to-Text. Audit confirmed the other model tools cache via same-origin immutable /models/*.

Kresna and others added 2 commits August 1, 2026 22:31
… re-download after refresh

- PaddleOCR fetches its model from raw/media.githubusercontent.com (git-LFS);
  those hosts weren't in the SW ml-models-cache rule, so the OCR model
  re-downloaded on every refresh. Add them to the CacheFirst urlPattern
  alongside Hugging Face + jsDelivr.
- VoiceToText: the transformers.js progress bar fires even on cache hits,
  which read as a re-download. Add a definitive modelCached check
  (caches.open('transformers-cache')) and label the bar accordingly.

Audit note: the other model tools (background-removal, ffmpeg, face-blur,
upscale, object-remove) load same-origin from /models/* served
'immutable, max-age=1yr' by the worker, so they cache on the HTTP layer and
need no SW rule.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ubfx4XocHcECaL8twp9zsr
fix(models): stop OCR model re-downloading on refresh + honest voice cache indicator
@slaveofcode
slaveofcode merged commit af6345c into main Aug 1, 2026
2 checks passed
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