Exemple #1
0
    public async Task <Blob> ReadBlob(BlobHandle handle)
    {
        if (BlobCache == null)
        {
            InitBlobCache();
        }
        Blob?cache = BlobCache.Find(handle);

        if (cache.HasValue)
        {
            return(cache.Value);
        }

        // Request blob if it was not found in cache
        RequestBlob(handle);
        return(await BlobStorage.Read(handle));
    }