Why not support defining cacheControl for certain file
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 291
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
// static-cache/index.js
198 obj.cacheControl = options.cacheControl // why not: obj.cacheControl = obj.cacheControl ? obj.cacheControl : options.cacheControl ?
199 obj.maxAge = obj.maxAge ? obj.maxAge : options.maxAge || 0
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 in static-cache/index.js at lines 198-199 and inspect how cacheControl and maxAge are assigned for each file. Preserve a file-specific cacheControl value when present, while using the configured option as a fallback; confirm the resulting behavior for files with and without their own value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100