protected boolean shouldSaveMetadata() {
      return (blobMetadataCache != null && isRangeRequest() && options.getBlobOptions.hasBlobSegmentIdx() == false
          && options.getBlobOptions.isRawMode() == false && blobId.getBlobDataType() == BlobId.BlobDataType.METADATA
          && blobType == BlobType.MetadataBlob && totalSize >= routerConfig.routerSmallestBlobForMetadataCache
          && isComplete() && getChunkException() == null && getOperationException() == null);
    }
Decides if we should cache metadata during a GET request
This method should be called after decryption is complete.
@return True if and only if
 - cache exists
 - it's a RANGE request
 - it's not a GET request for a segment
 - it is not a raw mode request
 - the blobID is for a metadata blob (this info is present only in v5 and v6 version of blobID)
 - the blob type is metadata blob
 - firstChunk is complete
 - there are no exceptions
 False, otherwise.
ambry-router/src/main/java/com/github/ambry/router/GetBlobOperation.java