C# 使用HttpResponseMessage,当用户没有internet时,如何加载缓存数据?

C# 使用HttpResponseMessage,当用户没有internet时,如何加载缓存数据?,c#,windows-8,httpresponse,.net-4.5,C#,Windows 8,Httpresponse,.net 4.5,我正在METRO应用程序中使用.NETFramework 4.5编写一个软件。我使用HttpClient和HttpResponseMessage类从RSS获取提要 private async Task<IList<FeedDataItem>> CreateRecipesAndRecipeGroups(string url) { HttpClient client = new HttpClient(); HttpRespons

我正在METRO应用程序中使用.NETFramework 4.5编写一个软件。我使用HttpClient和HttpResponseMessage类从RSS获取提要

    private async Task<IList<FeedDataItem>> CreateRecipesAndRecipeGroups(string url)
    {
        HttpClient client = new HttpClient();
        HttpResponseMessage response = null;

        try
        {
            response = await client.GetAsync(url);
        }
        catch (Exception ex)
        {
            // here I need to load the last feeds loaded
        }
    }
专用异步任务CreateRecipesandRecipeGroup(字符串url)
{
HttpClient=新的HttpClient();
HttpResponseMessage响应=null;
尝试
{
response=wait client.GetAsync(url);
}
捕获(例外情况除外)
{
//这里我需要加载最后加载的提要
}
}
正如您在我的代码中看到的,例如,如果我没有internet,程序应该加载以前或最新的提要


您知道如何修复此情况吗?

当没有internet可用的磁盘加载时,将上次下载的源序列化到磁盘

当没有internet可用的磁盘加载时,将上次下载的源序列化到磁盘