Liking cljdoc? Tell your friends :D

memento.redis.keys


by-patternclj

(by-pattern key)

Returns a SCAN result sequence, partitioned to 1000 items per batch. Needs to be called inside car/wcar.

Returns an eduction.

Returns a SCAN result sequence, partitioned to 1000 items per batch.
Needs to be called inside car/wcar.

Returns an eduction.
sourceraw docstring

default-keys-generatorclj

(default-keys-generator memento-space-prefix
                        memento-secondary-index-prefix
                        anon-key-strat)
source

digestclj

(digest dig-name o)
source

KeysGeneratorcljprotocol

Generates keys to be used when working with Redis.

Generates keys to be used when working with Redis.

cache-wildcard-keyclj

(cache-wildcard-key this cache-name)

A wildcard (glob) key that will return all keys used by a particular cache.

A wildcard (glob) key that will return all keys used by a particular cache.

segment-wildcard-keyclj

(segment-wildcard-key this cache-name segment)

A wildcard (glob) key that will return all keys used by a particular memoized function. Segment is memento.base.Segment.

A wildcard (glob) key that will return all keys used by a particular memoized
function. Segment is memento.base.Segment.

tag-epochs-keyclj

(tag-epochs-key this cache-name)

Key for the hash of tag id -> latest Redis invalidation epoch.

Key for the hash of tag id -> latest Redis invalidation epoch.

segment-key?clj

(segment-key? this cache-name segment k)

Returns true if key belongs to the Segment

Returns true if key belongs to the Segment

sec-indexes-keyclj

(sec-indexes-key this)

ID for the SET that houses all base keys of secondary indexes.

ID for the SET that houses all base keys of secondary indexes.

base-wildcard-keysclj

(base-wildcard-keys this)

Returns a coll of wildcard keys that will select all keys of all Memento Redis caches that use this kind of Keys Generator, used for nuking all the caches.

Returns a coll of wildcard keys that will select all keys of all Memento Redis caches
that use this kind of Keys Generator, used for nuking all the caches.

sec-index-id-keyclj

(sec-index-id-key this cache-name id)

ID for the SET that houses all the keys that get invalidated by id.

ID for the SET that houses all the keys that get invalidated by id.

cache-key?clj

(cache-key? this cache-name k)

Returns true if key belongs to the named cache

Returns true if key belongs to the named cache

epoch-keyclj

(epoch-key this cache-name)

Key for the cache-wide Redis invalidation epoch.

Key for the cache-wide Redis invalidation epoch.

entry-key?clj

(entry-key? this cache-name k)

Returns true if key is a concrete cache entry key.

Returns true if key is a concrete cache entry key.

entry-keyclj

(entry-key this cache-name segment args-key)

A concrete key for an entry. Segment is memento.base.Segment.

A concrete key for an entry. Segment is memento.base.Segment.
sourceraw docstring

sha1-digestclj

source

sha256-digestclj

source

wildcardclj

(wildcard key)

Creates a wildcard key from a list key. It will select all keys with additional elements in the list. It will not select the key itself.

Need to use REAL list, not list*. Metadata on the list is ignored as it screws up wildcarding

Escapes bytes ? * [ \ from provided key.

Creates a wildcard key from a list key. It will select all keys with additional
elements in the list. It will not select the key itself.

Need to use REAL list, not list*. Metadata on the list is ignored as it screws up wildcarding

Escapes bytes ? * [ \ from provided key.
sourceraw docstring

wildcard-exact-lengthclj

(wildcard-exact-length base-key)

Creates a SCAN pattern that selects keys whose serialized list count equals exactly (inc (count base-key)) and whose first (count base-key) elements match base-key. In other words: only descendants of base-key with exactly one additional element.

Throws if the target count byte would be a glob metachar (? * [ ), since the pattern would then be ambiguous. Cache keys are short enough that this is effectively unreachable.

Need to use REAL list, not list*. Metadata is ignored.

Escapes bytes ? * [ \ from provided key.

Creates a SCAN pattern that selects keys whose serialized list count equals
exactly (inc (count base-key)) and whose first (count base-key) elements match
base-key. In other words: only descendants of base-key with exactly one
additional element.

Throws if the target count byte would be a glob metachar (? * [ \), since the
pattern would then be ambiguous. Cache keys are short enough that this is
effectively unreachable.

Need to use REAL list, not list*. Metadata is ignored.

Escapes bytes ? * [ \ from provided key.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close