Normandy.Behaviours.MemoryStore.Redis
(normandy v2.2.0)
View Source
Durable MemoryStore over Redis. Each document is a hash; each namespace keeps a
sorted set of its paths (score 0, so lexical order) for listing and prefixes. Every
write is one Lua script, so compare-and-set, rename and delete_tree are atomic. All of
a namespace's keys share the {namespace} hash tag, so they live in one Redis Cluster
slot; the scripts derive document keys from the declared index key's prefix.
A namespace's content bytes live in a counter key beside its index (the document
count is the index's size), kept by the same scripts, so put/6's limits are checked
in the write's script.
The handle is {conn, prefix}; the host owns the Redix connection.
Summary
Functions
Opens a Redix connection to :url and returns the store's handle {conn, prefix}.
:url and :prefix are required.
Options
:url(String.t/0) - Required. The Redis URL.:prefix(String.t/0) - Required. The key prefix.