示例#1
0
文件: SyncNode.cs 项目: tana/Mondeto
    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));
    }