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

Method of

packages/client/lib/client/cache.ts:65–81  ·  view source on GitHub ↗

* Creates a new CacheStats instance with the specified statistics. * * @param hitCount - Number of cache hits * @param missCount - Number of cache misses * @param loadSuccessCount - Number of successful cache loads * @param loadFailureCount - Number of failed cache loads * @param t

(
    hitCount = 0,
    missCount = 0,
    loadSuccessCount = 0,
    loadFailureCount = 0,
    totalLoadTime = 0,
    evictionCount = 0
  )

Source from the content-addressed store, hash-verified

63 * @param evictionCount - Number of cache evictions
64 */
65 static of(
66 hitCount = 0,
67 missCount = 0,
68 loadSuccessCount = 0,
69 loadFailureCount = 0,
70 totalLoadTime = 0,
71 evictionCount = 0
72 ): CacheStats {
73 return new CacheStats(
74 hitCount,
75 missCount,
76 loadSuccessCount,
77 loadFailureCount,
78 totalLoadTime,
79 evictionCount
80 );
81 }
82
83 /**
84 * Returns a statistics instance where no cache events have been recorded.

Callers 4

minusMethod · 0.80
plusMethod · 0.80
snapshotMethod · 0.80
cache.spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected