nitrojs / nitrojs/nitro

Warn when cache computation is cheaper than cache retrival

Open
#2,559 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cache dx enhancement p2-nice-to-have v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

(From question by @InstantlyMoist in https://github.com/unjs/nitro/discussions/2558)

In development mode, we can detect situations when cache computation is cheaper than storing and retrieving it to warn users about it. It is not a precise prediction though because in production (when cache might be stored externally to disk or a remote server and database/server load is heavier than single user local/staging, the cache would make sense so maybe if we do it, we should do it for dev and prod)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified. Start by locating the cache computation and storage/retrieval paths, then determine how their costs could be compared in development and production. Done means an agreed warning scope and behavior backed by tests for the relevant cache scenarios.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.