* Returns a snapshot of the current statistics. * * @returns A snapshot of the current statistics
()
| 347 | * @returns A snapshot of the current statistics |
| 348 | */ |
| 349 | snapshot(): CacheStats { |
| 350 | return CacheStats.of( |
| 351 | this.#hitCount, |
| 352 | this.#missCount, |
| 353 | this.#loadSuccessCount, |
| 354 | this.#loadFailureCount, |
| 355 | this.#totalLoadTime, |
| 356 | this.#evictionCount |
| 357 | ); |
| 358 | } |
| 359 | |
| 360 | /** |
| 361 | * Creates a new DefaultStatsCounter. |