[Good first issue] 让 K 线缓存区分请求的起止时间
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, electron, react, typescript
Research direction
Start with the K-line cache key in packages/shared/src/agent/market-data-service.ts around lines 139-151, which currently builds the key from symbol, period and count only, leaving start and end out. Then read the cache and in-flight request handling at lines 245-278 and the K-line options in packages/longbridge-tools/src/tools/kline.ts. Done means sequential and concurrent calls with different date ranges each fetch their own data, same-range repeats still reuse the cache, and both cases have offline tests using a mock fetch function.
Written by the indexing model from the issue text.
Description
最小复现
使用带模拟取数函数的 MarketDataService。对 AAPL.US 发起两个周期、条数相同但日期范围不同的 getKline() 请求。模拟取数函数以各请求的 start 作为返回时间。顺序调用时第二个范围收到第一个范围的数据,两个请求并发时也只调用了一次取数函数。当前缓存键包含标的、周期和条数,start 与 end 未参与计算。
复验使用 Windows、Bun 1.4.2 和 main 的 579395e。
验收标准
- 同标的、同周期且日期范围不同的请求分别取数,顺序和并发调用都返回各自范围的数据。
- 同一范围的重复请求继续复用缓存或在途请求。用一个模拟取数函数补上两类离线回归。
源码起点
认领前可先说明准备完成的范围,再评论 /claim。参与方式见 #7。
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 37
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from ydflow/Trail
-
area:desktop bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:desktop bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area:desktop bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
bug triage:in-progress
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
redhat-developer/rhdh-plugin-export-overlays#4845 · 1 comment ·
Maintainers usually reply within 1 day
-
chore kaizen ui-rewrite
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
IBM/mcp-context-forge#7681 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cloudflare/workers-sdk#17159 ·
Maintainers usually reply within 1 day