revCacheLoaderForCv will load a document from the bucket using the CV, compare the fetched doc and the CV specified in the function, and will still return revid for purpose of populating the Rev ID lookup map on the cache
(ctx context.Context, backingStore RevisionCacheBackingStore, id IDandCV, loadBackup bool)
| 422 | // revCacheLoaderForCv will load a document from the bucket using the CV, compare the fetched doc and the CV specified in the function, |
| 423 | // and will still return revid for purpose of populating the Rev ID lookup map on the cache |
| 424 | func revCacheLoaderForCv(ctx context.Context, backingStore RevisionCacheBackingStore, id IDandCV, loadBackup bool) (bodyBytes []byte, history Revisions, channels base.Set, removed bool, attachments AttachmentsMeta, deleted bool, expiry *time.Time, revid string, hlv *HybridLogicalVector, err error) { |
| 425 | cv := Version{ |
| 426 | Value: id.Version, |
| 427 | SourceID: id.Source, |
| 428 | } |
| 429 | var doc *Document |
| 430 | if doc, err = backingStore.GetDocument(ctx, id.DocID, DocUnmarshalSync); doc == nil { |
| 431 | return bodyBytes, history, channels, removed, attachments, deleted, expiry, revid, hlv, err |
| 432 | } |
| 433 | |
| 434 | return revCacheLoaderForDocumentCV(ctx, backingStore, doc, cv, loadBackup) |
| 435 | } |
| 436 | |
| 437 | // Common revCacheLoader functionality used either during a cache miss (from revCacheLoader), or directly when retrieving current rev from cache |
| 438 |
no test coverage detected