Table of Contents

What is a Key Value Database/Store?

About

A key-value database / store is a NoSQL database based on the key-value data that is stored in

You store some data, called a value, inside a key. The data can later be retrieved by key.

Each value is not limited to primitive data type but also a complex one such as list, hashes.

Usage

List

Database

Cache library

Cache library may implement an on-disk representation (ie serialization, read-through, write-through). Be careful that you may not want any purge to happen.

There are 2 configurations/patterns:

// Pseudocode for reading values
v = cache.get(k)
if(v == null) {
    v = sor.get(k)
    cache.put(k, v)
}
// Pseudocode for writing values
v = newV
sor.put(k, v)
cache.put(k, v)


List: