Skip to content

Commit 6189b8e

Browse files
committed
πŸ“ ✨ feat & chore: Renew Grid when id changes & Update README
1 parent dc50fa9 commit 6189b8e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

β€ŽREADME.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- [x] Station 정보
1515
- [x] Station MMI II 이상 μ‹œ λ°œμƒ event
1616
- [ ] 닀쀑지진 λŒ€μ‘...?
17-
- [ ] 캐싱...?
17+
- [x] 캐싱...?
1818
- [x] TS λ°μ½”λ ˆμ΄ν„° 기반 이벀트...??
1919

2020
## Installation

β€Žsrc/client/client.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ export class PEWSClient {
243243
if (this._phase !== this._cachedPhase) {
244244
this.renewGrid = true
245245
needCaching = true
246-
// TODO: eqkInfo 캐싱 λ„μž… ν›„,
247-
// 이전 event ID 와 λ‹€λ₯Ό λ•Œμ— renewGrid = true 처리 ν•„μš”.
248246
}
249247
await this.eqkHandler(bitEqkData)
250248

@@ -298,7 +296,11 @@ export class PEWSClient {
298296
"eqkHandler: eqkID hasn't changed, using cached data",
299297
)
300298
return
299+
} else if (this._cachedPhase2Info !== undefined) {
300+
this.renewGrid = true
301+
this.logger.debug('New event ID, renewing grid data')
301302
}
303+
302304
break
303305

304306
case 3:
@@ -308,6 +310,9 @@ export class PEWSClient {
308310
"eqkHandler: eqkID hasn't changed, using cached data",
309311
)
310312
return
313+
} else if (this._cachedPhase3Info !== undefined) {
314+
this.renewGrid = true
315+
this.logger.debug('New event ID, renewing grid data')
311316
}
312317
break
313318
}

0 commit comments

Comments
Β (0)