I'm trying to use the Akavache GetAndFetchLatest method in Xamarin.Forms project but it's not working as I expected and was hoping someone would be able to spot where I'm going wrong.
I'm calling the method like this:
BlobCache.Secure.GetAndFetchLatest (cacheId, FetchOrganizations, dt => true);
The first time my app starts, the FetchOrganizations method is called as expected and I can see my local server handling the request. However, as soon as Akavache has cached data, it only returns the cache and never calls the FetchOrganizations method again. My server never sees another request. If I use a short timeout, the FetchOrganizations method will be called when the cache expires. I've tried using the fetchPredicate parameter as you can see, but that doesn't seem to help.
Is there another way I can make GetAndFetchLatest always try to get fresh data? Am I misunderstanding how the fetchPredicate works?