MetaMask / MetaMask/metamask-extension

Split non-caching functionality out of fetchWithCache, and utilize in appropriate cases

Open
#9,420 1 comment 0 reactions 0 assignees View on GitHub
type-refactor
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

`fetchWithCache` has both functionality explicitly related to caching a request, and functionality that just supports good practices and simplifications of fetch calls. In cases where one wants to make use of latter, but not the former, responses will be cached unecessarily. We should move the non-cache relate functionality of fetchWithCache into another function, and then make use of that function in any such existing cases.

Contributor guide

Open the contributing guide

Research direction

Start by locating fetchWithCache and reviewing its callers to distinguish caching uses from cases that only need its non-caching behavior. Done means the shared non-caching functionality has its own function and appropriate existing callers use it without unnecessarily caching responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.