Skip to content

Conversation

SAHU-01
Copy link

@SAHU-01 SAHU-01 commented Oct 18, 2025

Title

Fixes: #861

Description

The service worker was always storing responses in the mutable cache, regardless of protocol type (IPFS vs IPNS).

  • Modified fetchAndUpdateCache() to accept isMutable as a parameter
  • Updated getResponseFromCacheOrFetch() to pass the correct isMutable value based on protocol:
    • isMutable = true for IPNS (mutable content)
    • isMutable = false for IPFS (immutable content)
  • Now cache lookup and storage use the same cache for each protocol

Notes & open questions

image image

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

Reviewer: @SgtPooki

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.

bug: service-worker cache seems to be broken

1 participant