Skip to content

fix(cache): overhaul service worker caching and offline mode#398

Merged
sajjadmrx merged 5 commits into
widgetify-app:mainfrom
pooooooriya:fix/service-worker-cache-management
Jul 21, 2026
Merged

fix(cache): overhaul service worker caching and offline mode#398
sajjadmrx merged 5 commits into
widgetify-app:mainfrom
pooooooriya:fix/service-worker-cache-management

Conversation

@pooooooriya

Copy link
Copy Markdown
Contributor
  • switch public API to network-first so fresh data always loads (no more stale responses that needed "Disable cache")
  • cache only the active wallpaper for offline; stop caching gallery media, wallpaper previews and avatars
  • cache essential CDN assets (icons, currencies, themes, remote fonts) with bounded limits
  • version-namespaced caches so each release automatically clears the previous ones
  • add a 100MB hard cache budget with automatic cleanup of the least essential caches
  • bump version to 1.2.1

- switch public API to network-first so fresh data always loads (no more
  stale responses that needed "Disable cache")
- cache only the active wallpaper for offline; stop caching gallery media,
  wallpaper previews and avatars
- cache essential CDN assets (icons, currencies, themes, remote fonts) with
  bounded limits
- version-namespaced caches so each release automatically clears the
  previous ones
- add a 100MB hard cache budget with automatic cleanup of the least
  essential caches
- bump version to 1.2.1
@pooooooriya

Copy link
Copy Markdown
Contributor Author

یه بازنویسی حسابی روی سیستم کش سرویس‌ورکر و آفلاین‌مود

چی درست شد

  • مشکل ۶۰۰ مگ کش حل شد — دیگه عکس‌های گالری، پرِویوها و اواتارها الکی کش نمی‌شن.
  • فقط والپیپر فعال (عکس یا ویدیو) برای آفلاین کش می‌شه، نه کل گالری.
  • و API حالا network-first شده؛ دیگه داده‌ی بیات نمی‌ده و لازم نیست کاربر «disable cache» بزنه.
  • ملزومات ضروری (آیکون‌ها، ارزها، تم‌ها، فونت‌های ریموت) با سقف منطقی کش می‌شن.
  • کش نسخه‌محور شد؛ هر ورژن جدید، کش‌های قبلی خودکار پاک می‌شن (همین آپدیت، اون ۶۰۰ مگِ کاربرای فعلی رو هم پاک می‌کنه).
  • سقف سخت ۱۰۰ مگ اضافه شد؛ اگه کش از این بیشتر شه، خودکار قدیمی‌ترین‌های غیرضروری پاک می‌شن (والپیپر فعال محافظت می‌شه).

نسخه به 1.2.1 بامپ شد.

@sajjadmrx
sajjadmrx merged commit 2fa9f82 into widgetify-app:main Jul 21, 2026
1 check 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.

2 participants