(id: string)
| 51 | } |
| 52 | |
| 53 | fetchUser(id: string): Promise<Record<string, any>> { |
| 54 | let entry = this.map.get(id); |
| 55 | if (entry !== undefined && !entry.invalid) { |
| 56 | console.log('Reusing user ID ' + id); |
| 57 | return entry.promise; |
| 58 | } |
| 59 | |
| 60 | console.log('Fetching user ID ' + id); |
| 61 | const promise = plainFetchUser(this.oauth, id); |
| 62 | entry = new UserCacheEntry(id, promise); |
| 63 | this.map.set(id, entry); |
| 64 | return promise; |
| 65 | } |
| 66 | } |
no test coverage detected