Dexdis is a thin wrapper around the browser database IndexedDB and leverages the full power of the asynchronous API.
Dexdis supports all keys and values just as IndexedDB which means, you can save
binary blobs just as
easy as strings and use complex keys like
['a', ['key', 42]] natively.
By using IndexedDB every command runs transactional and is fully persisted after completion. Multiple commands can be chained for more flexibility.
Dexdis supports every browser that implements IndexedDB. For older browsers (iOS, Android) that just implement the deprecated WebSQL standard you can use a polyfill.
Use the console to the try out Dexdis commands. For a list of
available commands see the
Every command has the form
command(arg1, arg2, ...). Usually
the last parameter is a callback, but the console will just
print the result after you run the command.
You can clear the database using the FLUSHDB
To start you can play around with GET
and SET. Dexdis also supports
a time to live for keys, which means that after a given amount
of time keys can expire and will be deleted. The
EXPIRE command sets the
seconds after which the key will expire. Check the remaining time
with TTL. Keys can also be
deleted manually using DEL.