Akavache

An asynchronous, persistent key-value store created for writing desktop and mobile applications, based on SQLite3. Akavache is great for both storing important data as well as cached local data that expires.

MIT License

Stars
2.4K
Committers
56

Bot releases are hidden (Show)

Akavache - 5.0.0

Published by ghuntley almost 8 years ago

As part of this release we had 14 issues closed.

Breaking changes

  • #317 Update the SQLite dependency to support Android 7
  • #291 Akavache 5.0 Discussion
  • #283 Remove the support for WinRT80, since it can't even be opened in VS2015

Feature

  • #255 Allow UTC DateTimes to be forced.

Bugs

  • #282 Pin the Splat dependency in the nuspec file to the same version we're building Akavache with
  • #258 InsertAllObjects self recursion

Improvements

  • #319 Implemented automatic CI release workflow
  • #318 Implemented continuous integration
  • #289 Index the TypeName in the database to make bulk object queries faster
  • #288 Added CacheElement.Expiration index
  • #260 Lazily initialize the various SQLite operations
  • #259 Remove some unused code

Documentation

  • #311 Added issue/pr templates and contrib guidelines
  • #293 Added Shutdown instructions to README.

Where to get it

You can download this release from nuget.org

Akavache - Akavache 4.1.2

Published by anaisbetts almost 9 years ago

What's New

Bug Fixes

  • Fix hang on initialization (#229, thanks @pureween)
  • Prevent shutdown for caches that aren't being used (#243, thanks @jcomtois)
  • Fix a deadlock in Flush / Vacuum (#254, thanks @niik)
  • Add a new property to force time zone for Akavache.SQLite3 (#255, thanks @kentcb)
Akavache - Akavache 4.1.1

Published by anaisbetts almost 9 years ago

What's New

  • Fix Vacuum (#214, thanks @niik)
Akavache - Akavache 4.1.0

Published by anaisbetts almost 10 years ago

What's New

Xamarin.iOS / Xamarin.Mac 64-bit support

Akavache now supports the Xamarin Unified profile for iOS and Mac - if you use the Migration tool, it is highly advised to remove and re-add the Akavache packages manually.

Bug Fixes

  • Fix DownloadUrl and friends to correctly store content
Akavache - Akavache 4.0.4

Published by anaisbetts almost 10 years ago

What's New

  • Add a feature to DownloadUrl to specify an explicit key (#181, thanks @RocketPop)
  • Ensure that GetCreatedAt never throws (#184, thanks @flagbug)
Akavache - Akavache 4.0.3

Published by anaisbetts about 10 years ago

What's New

Bug Fixes

  • Fix GetCreatedAt to return correct times (#177, thanks @niik)
  • Ensure waiting on Shutdown doesn't block
  • Small performance improvement
Akavache - Akavache 4.0.2

Published by anaisbetts about 10 years ago

What's New

  • Update to v0.5.0 of SQLitePCL-Raw, (#171 thanks @shiftkey)
  • Improve performance on mobile devices by firing less timers (#176)
Akavache - Akavache 4.0.1

Published by anaisbetts about 10 years ago

What's New

Bug Fixes

  • Fix several bugs related to using Akavache.Sqlite3 on Windows Phone 8.1 (WinRT)
Akavache - Akavache 4.0

Published by anaisbetts about 10 years ago

Welcome to Akavache 4.0

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
Akavache - Akavache 3.2.0

Published by anaisbetts almost 11 years ago

What's New

Akavache.Portable.dll is no more, Long Live Akavache.dll

Starting with this release, Akavache Core is now always just Akavache.dll. Instead of a separate Akavache.Portable.dll that you include into every build, there is now a portable version of Akavache.dll. Link to the portable version in your PLibs and the platform versions in your apps.

Bug fixes

  • Work around a bug in the Xamarin AOT compiler which would cause failures in Xamarin.iOS on device
  • Fixed a bug resulting from the latest Splat update where using Bitmap loading would result in a compiler error
  • Fix package references that were missing
Akavache - Akavache 3.1.2

Published by anaisbetts almost 11 years ago

What's New

Bug Fixes:

  • Ensure that GetAndFetchLatest uses the correct cache key (#89, thanks @nigel-sampson)
  • Object invalidation should use type-prefixing (#91, thanks @nigel-sampson)
Akavache - Akavache 3.1.1

Published by anaisbetts about 11 years ago

What's New

Bulk Operations

BlobCache now supports overloads and new methods to add / get / invalidate multiple objects in the same API call. Previously if you wanted to insert many objects into the cache at the same time, it could be potentially very expensive / wasteful. Check out #79 for the details. For example:

var interestingKeys = await BlobCache.UserAccount.GetObjectsAsync<string>(new[] { "Foo", "Bar", "Baz", });

interestingKeys["Foo"]
>>> It worked!

Speed!

Akavache now correctly parallelizes connections to SQLite as well as fixes some threading errors that you might have been seeing (#66).

Hide our version of SQLite3

Our version of @praeclarum's SQLite3 bindings were exposed as public classes, which conflicted with the official versions, this release makes them internal (#72).

Modern Xamarin support

Akavache is now built against the official Xamarin Rx binaries. This means that on MonoMac, you need to be up-to-date on the latest Mono install.

Other Stuff

  • Bug fixes for WP8 (#68, thanks @petegoo)
  • Fixed a glitch in DownloadUrl (#64, thanks @niik)
Akavache - Akavache 3.0.2

Published by anaisbetts about 11 years ago

What's New

Bug Fixes

  • Fix bugs around manual dependency registration
  • Correctly handle invalidation in GetAndFetchLatest
  • Handle unsynchronized access to variable in SQLite3 driver
Akavache - Akavache 3.0.1

Published by anaisbetts over 11 years ago

What's New

Akavache 3.0 is now released! A special thanks to @onovotny for his huge contribution to PLib support in this release.

Portable Library Support

Akavache 3.0 can now be used with Portable Libraries, including handling images and downloading URLs, via the Splat helper library. This means that with Akavache, nearly all of your serialization and network access layer can be cross-platform.

Cleaned up initialization support

Just like in ReactiveUI 5.0, Akavache now has a much cleaner initialization setup, which is also reliant on RxUI 5.0's RxApp.DependencyResolver. Many libraries now initialize themselves automatically if possible (on iOS / Cocoa), and other platforms now only require you to set BlobCache.ApplicationName.

Platforms Supported

Note that for this release, .NET 4.0-based platforms such as Silverlight and WP7 are no longer supported. Bug fixes will still be ported to the Akavache 2.x series when appropriate, you can use the NuGet Package Console to configure your app to only download 2.x updates. Here are the officially supported platforms:

  • Xamarin.iOS
  • Xamarin.Mac
  • Xamarin.Android
  • .NET 4.5 Desktop (WPF)
  • Windows Phone 8
  • Windows Store (WinRT)
Akavache - Akavache 2.6.7

Published by anaisbetts over 11 years ago

What's New

Notable changes since 2.6.5

  • Handle serializing simple types as values in SQLite3 backend
  • Correctly handle opening paths containing Unicode characters in SQLite3 backend
  • Fix race condition on dispose where disposing a single BlobCache could affect other blob caches.
  • Remove WP8 SQLite3-based backend, as WP8 disables P/Invoke on device at runtime.
Akavache - Akavache 2.6.5

Published by anaisbetts over 11 years ago

What's New

Bugfix release, fixes problem with using BlobCache.Secure

Akavache - Akavache 2.6.4

Published by anaisbetts over 11 years ago

What's New

  • Akavache.SQLite3 now configures itself AutoMagically™ if it's included in your project, no need to manually set BlobCache.LocalMachine et al.
  • Remove key operation serialization from old-school Akavache - you need to await all calls to BlobCache, no more sloppy coding!
  • Support for Xamarin.Mac, Xamarin.iOS, and Xamarin.Android - on Cocoa-based platforms, your ApplicationName is automatically configured to be your Bundle ID, no need to set it by-hand.
  • Fix a bug in SQLite3 engine where GetOrFetchObject with an expiration wouldn't work.
Akavache - Akavache 2.6.2

Published by anaisbetts over 11 years ago

What's New

Completion for Object Methods

Now all object invalidation methods (like InvalidateObject, InvalidateAllObjects, etc) return IObservable<Unit> so you can await them

Miscellaneous fixes

  • Fixes to PersistentBlobCache Dispose so that it properly flushes metadata on exit
Akavache -

Published by anaisbetts over 11 years ago

What's New

Shut It All Down

Akavache now has an easy way to shut itself down. Make sure to run this on app shutdown:

BlobCache.Shutdown().Wait()

Or if you're on WinRT:

var deferral = e.SuspendingOperation.GetDeferral();
await BlobCache.Shutdown();
deferral.Complete()

Other Stuff

  • Fix a bug where in certain situations, Akavache would deadlock (2917a5e)
Akavache - Akavache 2.6.0

Published by anaisbetts over 11 years ago

What's New

Race Condition Changes

Consider the following piece of code:

BlobCache.UserAccount.Invalidate("TheKey");
BlobCache.UserAccount.InsertObject("TheKey", new MyAwesomeKey());

This code is technically incorrect, yet will often appear to work correctly depending on the backing BlobCache. The reason is, that the invalidate and Insert happen concurrently, meaning it is possible for the Insert to succeed, then the Invalidate to remove the new key (never mind that it isn't necessary to actually Invalidate before Insert). To fix this, in Akavache 2.6.0, operations done to the same key are guaranteed to happen in order.

Shutdown Changes

Disposing a BlobCache is asynchronous, yet the Dispose method call has no way to signal when it is complete. A new Shutdown Observable exists to facilitate this. So, to flush the blob cache properly, now run:

BlobCache.UserAccount.Dispose();
BlobCache.UserAccount.Shutdown.Wait();

Other Changes

  • Bug fixes around leaking file handles in certain circumstances
  • Fixes to more clearly throw error messages when Akavache is used incorrectly