Storehouse is a persistent data store for the Dojo Toolkit implementing the dojo/store API.
It's built upon dojo/store/Memory, so you have all the API you have with the Memory store, just that the data gets persisted client-side.
Behind the covers, it uses IndexedDB as storage engine and falls back to localStorage if IndexedDB is not available – if that fails, too, it uses cookies as a last resort to store the data.
Storehouse keeps a copy of the stored data in memory, allowing for fast, synchronous read access and queries.
Only write operations are asynchronous (as the underlying engine might work asynchronously itself), and return Promises to make working with it as easy as possible. For more information on Promises, please refer to the Dojo documentation.
Clone or download this repository and require 'Storehouse' in your application. Other ways to obtain Storehouse will follow.
You might need to tell the Dojo loader where the Storehouse modules are; this
is done via the dojoConfig
config object. Please refer to the
code in the examples to see some examples of this.
For usage details please refer to the project's Usage Docs.
Examples are in the project's `example` folder. You can try them out directly in your browser over here.
Storehouse is available under the terms of the modified BSD license or the Academic Free License version 2.1. For details, see the LICENSE file.
dojo 1.8
Jens Arps
Ping me on Twitter: @jensarps