You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While Making 2 of the same request to the same url i the System.IO.IOException: 'Sharing violation on path /data/user/0/com.companyname.chaycesanime/cache/com.companyname.chaycesanime/MonkeyCache/Barrel.db' exception.
public static async Task<T> GetAsync<T>(string url, int days = 1, bool forceRefresh = false)
{
var json = string.Empty;
if (Connectivity.NetworkAccess != NetworkAccess.Internet)
json = Barrel.Current.Get<string>(url);
if (!forceRefresh && !Barrel.Current.IsExpired(url))
json = Barrel.Current.Get<string>(url);
try
{
if (string.IsNullOrWhiteSpace(json))
{
json = await client.GetStringAsync(url);
Barrel.Current.Add(url, json, TimeSpan.FromDays(days));
}
return JsonConvert.DeserializeObject<T>(json);
}
catch (Exception ex)
{
Console.WriteLine($"Unable to get information from server {ex}");
//probably re-throw here :)
}
return default(T);
}
The text was updated successfully, but these errors were encountered:
While Making 2 of the same request to the same url i the System.IO.IOException: 'Sharing violation on path /data/user/0/com.companyname.chaycesanime/cache/com.companyname.chaycesanime/MonkeyCache/Barrel.db' exception.
The text was updated successfully, but these errors were encountered: