Akavache explorer

Akavache Cache Explorer for Xamarin

So recently I had a chance to work on a Xamarin app that deals with Cache Invalidation (yep, one of the three most difficult things in computer science :)). For cacheing I used Akavache and mostly its famous GetAndFetchLatest method. And I noticed that it would be very cool to be able to inspect the local cache while doing manual testing to make sure cache is being invalidated as expected. It wouldn’t be too hard to do that manually but I decided to make a reusable solution. So I wrote two nuget packages AkavacheExplorer.iOS and AkavacheExplorer.Droid that allows us to inspect local Acavache store. We just have to include these packages in platform-specific Xamarin projects and present explorer’s UIViewController/Activity on each platform.

Sample for iOS:

using AkavacheExplorer.iOS;
PresentViewController(Explorer.GetNavigationController(), true, null);

Sample for Android:

using AkavacheExplorer.Droid;

And a list of all keys will be presented. When key is selected data will be serialized and JSON will be presented. As simple as that!

akavache explorer ios list

akavache explorer android list

Explorer does not support images or binary data yet. But the source code is available on my github page so feel free to adapt it to your needs.


I just released versions 1.1.0 of these packages to nuget.org. They add an ability to view cached content not only as json but as raw text and image as well. Feel free to try them out! Any feedback is also welcome.

akavache explorer ios image

akavache explorer android image

Hi, my name is Andrius. Welcome to my blog! I'm freelance mobile (C# Xamarin) developer currently learning Swift. I also do some ASP.NET Core Web API work as well. I blog mostly about work related subjects. If you would like to contact me for any reason shoot me an email at andrius [at] applications.lt

Leave a reply:

Your email address will not be published.

Site Footer