MetaMask / MetaMask/metamask-extension
Create a cache eviction policy for localforage
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
What is this about?
@davidmurdoch found a localforage cache in shared/lib/storage-helpers.js that's used in shared/lib/fetch-with-cache.ts that doesn't seem to ever evict cached entries. We want to make sure that cached items are removed when no longer needed.
Docs: https://localforage.github.io/localForage/#data-api
Part of this work will be to write a migration to clear out all pre existing obsolete cache entries.
Scenario
No response
Design
No response
Technical Details
No response
Threat Modeling Framework
No response
Acceptance Criteria
No response
Stakeholder review needed before the work gets merged
- Engineering (needed in most cases)
- Design
- Product
- QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- Security
- Legal
- Marketing
- Management (please specify)
- Other (please specify)
References
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading shared/lib/storage-helpers.js and shared/lib/fetch-with-cache.ts, then consult the localForage Data API documentation. Define the cache eviction behavior and migration scope from the existing cache usage. Done means obsolete pre-existing entries are cleared and cached items are removed when no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100