MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / statsRecorderFunc

Method statsRecorderFunc

db/revision_cache_lru.go:304–311  ·  view source on GitHub ↗
(cacheHit bool)

Source from the content-addressed store, hash-verified

302}
303
304func (rc *LRURevisionCache) statsRecorderFunc(cacheHit bool) {
305
306 if cacheHit {
307 rc.cacheHits.Add(1)
308 } else {
309 rc.cacheMisses.Add(1)
310 }
311}
312
313// Adds a revision to the cache.
314func (rc *LRURevisionCache) Put(ctx context.Context, docRev DocumentRevision, collectionID uint32) {

Callers 3

getFromCacheByRevMethod · 0.95
getFromCacheByCVMethod · 0.95
GetActiveMethod · 0.95

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected