Redis based konserve backend.
Redis based konserve backend.
(batch-delete client store-keys)(batch-delete client store-keys chunk-size)Delete store-keys with one DEL per chunk of batch-delete-chunk keys.
Returns {:deleted #{...} :failed {key exception}}. A missing key counts as
deleted. A chunk whose command fails is reported in :failed, with the
exception as diagnostic, and the remaining chunks still run.
Delete `store-keys` with one DEL per chunk of `batch-delete-chunk` keys.
Returns {:deleted #{...} :failed {key exception}}. A missing key counts as
deleted. A chunk whose command fails is reported in `:failed`, with the
exception as diagnostic, and the remaining chunks still run.Keys per DEL command in a batch deletion.
Keys per DEL command in a batch deletion.
(key-page client cursor limit)At most limit physical keys, and the cursor to continue from (nil at the end).
The cursor is the EDN value [scan-cursor pending-keys]. SCAN may return more
keys than its COUNT hint, so the surplus is carried in pending-keys and
emitted by a later page rather than dropped. scan-cursor is nil once Redis
has completed its iteration (returned "0"); the page cursor is nil once that
has happened and nothing is pending. At most one SCAN round trip per page, and
none while the carried surplus fills a page by itself; empty nonterminal pages
are possible.
SCAN guarantees that every key present for the whole iteration is returned at
least once, not exactly once: a key can occur on more than one page (e.g.
across a rehash). The marker key is excluded, as in -keys.
At most `limit` physical keys, and the cursor to continue from (nil at the end). The cursor is the EDN value [scan-cursor pending-keys]. SCAN may return more keys than its COUNT hint, so the surplus is carried in `pending-keys` and emitted by a later page rather than dropped. `scan-cursor` is nil once Redis has completed its iteration (returned "0"); the page cursor is nil once that has happened and nothing is pending. At most one SCAN round trip per page, and none while the carried surplus fills a page by itself; empty nonterminal pages are possible. SCAN guarantees that every key present for the whole iteration is returned at least once, not exactly once: a key can occur on more than one page (e.g. across a rehash). The marker key is excluded, as in `-keys`.
(mdelete client keys)Delete multiple keys in a single DEL call. Returns the number of keys deleted.
Delete multiple keys in a single DEL call. Returns the number of keys deleted.
(mget-objects client keys)Fetch multiple keys in a single MGET call. Returns values in the same order as the input keys. Missing keys return nil in their position.
Fetch multiple keys in a single MGET call. Returns values in the same order as the input keys. Missing keys return nil in their position.
(put-object-conditional client key bytes expected)SET key to bytes only if it currently holds expected — or, when expected
is ::absent, only if it holds nothing. True on success, false on conflict.
SET `key` to `bytes` only if it currently holds `expected` — or, when `expected` is `::absent`, only if it holds nothing. True on success, false on conflict.
(release store env)Must be called after work on database has finished in order to close connection
Must be called after work on database has finished in order to close connection
(scan-step client cursor count)One SCAN step from cursor (a Redis cursor string, "0" to start).
Returns [next-cursor keys]; next-cursor "0" means the iteration is complete.
COUNT is only a hint: Redis may return more keys, fewer, or none.
One SCAN step from `cursor` (a Redis cursor string, "0" to start). Returns [next-cursor keys]; next-cursor "0" means the iteration is complete. COUNT is only a hint: Redis may return more keys, fewer, or none.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |