MCPcopy
hub / github.com/redis/node-redis / plus

Method plus

packages/client/lib/client/cache.ts:184–193  ·  view source on GitHub ↗

* Returns a new CacheStats representing the sum of this CacheStats and another. * * @param other - The statistics to add to this instance * @returns The sum of this instance and other

(other: CacheStats)

Source from the content-addressed store, hash-verified

182 * @returns The sum of this instance and other
183 */
184 plus(other: CacheStats): CacheStats {
185 return CacheStats.of(
186 this.hitCount + other.hitCount,
187 this.missCount + other.missCount,
188 this.loadSuccessCount + other.loadSuccessCount,
189 this.loadFailureCount + other.loadFailureCount,
190 this.totalLoadTime + other.totalLoadTime,
191 this.evictionCount + other.evictionCount
192 );
193 }
194}
195
196/**

Callers 1

cache.spec.tsFile · 0.80

Calls 1

ofMethod · 0.80

Tested by

no test coverage detected