Looks up a revision from the cache. Returns the body of the revision, its history, and the set of channels it's in. If the cache has a loaderFunction, it will be called if the revision isn't in the cache; any error returned by the loaderFunction will be returned from Get.
(ctx context.Context, docID, revID string, collectionID uint32, includeDelta bool)
| 161 | // If the cache has a loaderFunction, it will be called if the revision isn't in the cache; |
| 162 | // any error returned by the loaderFunction will be returned from Get. |
| 163 | func (rc *LRURevisionCache) GetWithRev(ctx context.Context, docID, revID string, collectionID uint32, includeDelta bool) (DocumentRevision, error) { |
| 164 | return rc.getFromCacheByRev(ctx, docID, revID, collectionID, true, includeDelta) |
| 165 | } |
| 166 | |
| 167 | func (rc *LRURevisionCache) GetWithCV(ctx context.Context, docID string, cv *Version, collectionID uint32, includeDelta bool, loadBackup bool) (DocumentRevision, error) { |
| 168 | return rc.getFromCacheByCV(ctx, docID, cv, collectionID, true, includeDelta, loadBackup) |