Skip to content

bug: service-worker cache seems to be broken #861

@SgtPooki

Description

@SgtPooki

No matter how many times I refresh a page, I cannot get cached response HIT to show in the logs. We should probably be using a persistent blockstore instead and this would solve most of our problems.

I believe cache.put(cacheKey, resp) and cache.match(cacheKey) will not work because of the way the browser cache works... but I also think we have a bug in some mutable checks..

also, fetchAndUpdateCache is always passing mutable=true with await storeReponseInCache({ response, isMutable: true, cacheKey, event }) which can cause cache misses because it's always writing to the mutable cache, instead of the immutable cache when protocol=ipfs

cache workflow needs seriously cleaned up

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High: Likely tackled by core team if no one steps upbugSomething isn't workingeffort/daysEstimated to take multiple days, but less than a weekexp/intermediatePrior experience is likely helpfulkind/bugA bug in existing code (including security flaws)status/readyReady to be worked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions