private CompletableFuture<Boolean> updateTtlAsyncIfNeeded(BlobId blobId) {
    String blobKey = blobId.getID();
    // See note in deleteIfNeeded.
    if (!checkCacheState(blobKey, BlobState.TTL_UPDATED)) {
      return cloudDestination.updateBlobExpirationAsync(blobId, Utils.Infinite_Time, this::preTtlUpdateValidation)
          .handle((lifeVersion, throwable) -> {
            if (throwable != null) {
              // Cache entry could be stale, evict it to force refresh on retry.
              removeFromCache(blobKey);
              throw throwable instanceof CompletionException ? (CompletionException) throwable
                  : new CompletionException(throwable);
            }
            addToCache(blobKey, lifeVersion, BlobState.TTL_UPDATED);
            return (lifeVersion != -1);
          });
    }
    return CompletableFuture.completedFuture(false);
  }
Update the TTL of the specified blob if needed depending on the cache state asynchronously.
@param blobId the blob to update
@return a {@link CompletableFuture} that will eventually complete successfully if the update was performed or
        will contain a {@link CloudStorageException} if an error occurred.
ambry-cloud/src/main/java/com/github/ambry/cloud/CloudBlobStore.java