Akavache 4.0 is Released

Published on March 08, 2014

After 8 months of work and 424 commits from 7 authors, Akavache 4.0 is now released! Thanks to the contributors for this release:

  • Johan Laanstra
  • Oren Novotny
  • Brendan Forster
  • Phil Haack
  • Herman Banken
  • Oskar Hermansson

In particular, a huge thanks goes to Johan, who migrated the SQLite-based backend to Eric Sink’s SQLitePcl.Raw - a ton of work!

A Universal Akavache

Akavache 4.0 now supports a native SQLite on all platforms, as well as including support for new platforms:

  • Xamarin.Android
  • Xamarin.iOS
  • Xamarin.Mac
  • Xamarin Forms (iOS + Android + WP8)
  • .NET 4.5
  • Universal Windows Apps (WPA81)
  • Windows Phone 8.0 Apps (Silverlight-based)
  • Windows Store Apps (WinRT)

Akavache is also much smaller, because it no longer depends on ReactiveUI, instead depending on a much smaller library called Splat. Akavache also has now moved to the latest version of the Reactive Extensions, v2.2.5.

SQLite Performance is Significantly Improved

The SQLite driver has been completely rewritten in Akavache 4.0 for performance, especially when used by multiple threads at the same time. Synthetic benchmarks on the new SQLite backend show that it is 8x faster at reading random data, and a whopping 82x faster than the previous version at writing random data.

This improvement was done without any on-disk metadata changes - existing SQLite databases are immediately compatible. This new driver also completely resolves the “locking” issues that people would see when executing many operations in parallel.

Garbage Collection and Cleanup

Akavache now allows applications to explicitly schedule cleanup of the underlying database, via a new Vacuum API. This will drop all expired keys from the database, as well as its name implies, execute a VACUUM operation on SQLite to compact the database.

Migration Notes

  • Akavache now no longer ships the deprecated filesystem backend. You can now find this backend in the Akavache.Deprecated NuGet package. You should plan to move away from this backend and into the SQLite-based backend in your next release.
  • GetAllKeys is now an asynchronous operation.
  • TestBlobCache is now called InMemoryBlobCache

Anaïs Betts

Written by Anaïs [a.na'is] Betts, who lives in San Francisco.

Twitter LogoCopyright 2018 Anaïs BettsGitHub Logo