* Lazily initialize/load the LRU chain.
()
| 264 | * Lazily initialize/load the LRU chain. |
| 265 | */ |
| 266 | private async lru(): Promise<LruList> { |
| 267 | if (this._lru === null) { |
| 268 | const table = await this.lruTable; |
| 269 | try { |
| 270 | this._lru = new LruList(await table.read<LruState>('lru')); |
| 271 | } catch { |
| 272 | this._lru = new LruList(); |
| 273 | } |
| 274 | } |
| 275 | return this._lru; |
| 276 | } |
| 277 | |
| 278 | /** |
| 279 | * Sync the LRU chain to non-volatile storage. |