(path: string)
| 136 | |
| 137 | // return the index file if cached, else undefined |
| 138 | private getCachedIndexFile(path: string): IndexEntry[] | undefined { |
| 139 | const cache = this.state.get<CachedIndexFiles>('r.helpPanel.cachedIndexFiles', []); |
| 140 | const ind = cache.findIndex(v => v.path === path); |
| 141 | if(ind < 0){ |
| 142 | return undefined; |
| 143 | } else{ |
| 144 | return cache[ind].items; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | // Save a new file to the cache (or update existing entry) |
| 149 | private async updateCachedIndexFile(path: string, items: IndexEntry[] | undefined): Promise<void>{ |
no test coverage detected