Liking cljdoc? Tell your friends :D

memento.redis

Settings for Redis cache.

Besides there, the cache also supports these settings from base Memento:

  • key-fn
  • ret-fn
  • evt-fn
  • ttl
  • fade
Settings for Redis cache.

Besides there, the cache also supports these settings from
base Memento:
- key-fn
- ret-fn
- evt-fn
- ttl
- fade
raw docstring

anon-keyclj

Specifies how Memento Segment ID is processed by default KeysGenerator, when ID is a function object. Available settings: :empty, :stringify, defaults to :empty.

If :empty, then any function object ID is replaced by empty string. If :stringify, then any function object ID is replaced by (str function)

Specifies how Memento Segment ID is processed by default KeysGenerator, when ID is a function object.
Available settings: :empty, :stringify, defaults to :empty.

If :empty, then any function object ID is replaced by empty string.
If :stringify, then any function object ID is replaced by (str function)
sourceraw docstring

cacheclj

Value for :memento.core/type setting for redis cache

Value for :memento.core/type setting for redis cache
sourceraw docstring

connclj

Redis connection setting. It can be:

  • a Carmine connection map
  • a IDeref object (Var, Atom) which will contain a Carmine connection map, it will be derefed at each use.
  • a 0-arg fn that will return a Carmine connection map, it will be evaluated at each use

2 of 3 here will be evaluated each lookup (or other operation).

Redis connection setting. It can be:
- a Carmine connection map
- a IDeref object (Var, Atom) which will contain a Carmine connection map, it
will be derefed at each use.
- a 0-arg fn that will return a Carmine connection map,
it will be evaluated at each use

2 of 3 here will be evaluated each lookup (or other operation).
sourceraw docstring

hit-detect?clj

Cache setting, if set to true, any time there's a cache miss and an IObj is returned, it will have meta key :memento.redis/cached? with value true/false

Cache setting, if set to true, any time there's a cache miss and an IObj is returned, it will have
meta key :memento.redis/cached? with value true/false
sourceraw docstring

keygenclj

Specify the way the keys are generated. Value is an instance of KeysGenerator protocol.

If not specified, the default keys generator will be used.

Specify the way the keys are generated. Value is an instance of KeysGenerator protocol.

If not specified, the default keys generator will be used.
sourceraw docstring

nameclj

Cache name. It is a part of Redis keys' names.

It is useful if you want to cache the same function in two different caches and have them not collide.

It defaults to empty string.

Cache name. It is a part of Redis keys' names.

It is useful if you want to cache the same function in two different caches and
have them not collide.

It defaults to empty string.
sourceraw docstring

nuke!!clj

(nuke!! memoized-function)
(nuke!! conn keys-generator)

Remove all entries created by Memento.

The parameter is a memoized function.

The actual database being nuked (connection and database) and key naming schema (KeysGenerator) is determined based on the settings on the memoized function. For most applications pointing this at any memoized function will have the same result, but if you're using multiple different databases or KeysGenerator instances, then only the corresponding database/keys schema is wiped.

Remove all entries created by Memento.

The parameter is a memoized function.

The actual database being nuked (connection and database) and key naming schema (KeysGenerator)
is determined based on the settings on the memoized function. For most applications pointing this
at any memoized function will have the same result, but if you're using multiple different
databases or KeysGenerator instances, then only the corresponding database/keys schema is wiped.
sourceraw docstring

sha1clj

(sha1 o)

Function that returns a byte array with SHA1 hash of the Nippy serialized form of the object. Used in conjunction with key-fn to shorten long keys.

Since serialized function arguments are part of the Redis keys, this can lead to functions with large arguments using up a lot of RAM in Redis just due to keys.

You can write a key-fn that returns a hash of the actual function arguments (or a particular long argument).

This is a convenience function to achieve that.

Note that nippy already does lz4 compression on keys over 8kb.

Function that returns a byte array with SHA1 hash of the Nippy serialized
form of the object. Used in conjunction with key-fn to shorten long keys.

Since serialized function arguments are part of the Redis keys,
this can lead to functions with large arguments using up a lot of
RAM in Redis just due to keys.

You can write a key-fn that returns a hash of the actual function arguments (or a particular long argument).

This is a convenience function to achieve that.

Note that nippy already does lz4 compression on keys over 8kb.
sourceraw docstring

sha256clj

(sha256 o)

Function that returns a byte array with SHA-256 hash of the Nippy serialized form of the object. Used in conjunction with key-fn to shorten long keys.

Since serialized function arguments are part of the Redis keys, this can lead to functions with large arguments using up a lot of RAM in Redis just due to keys.

You can write a key-fn that returns a hash of the actual function arguments (or a particular long argument).

This is a convenience function to achieve that.

Note that nippy already does lz4 compression on keys over 8kb.

Function that returns a byte array with SHA-256 hash of the Nippy serialized
form of the object. Used in conjunction with key-fn to shorten long keys.

Since serialized function arguments are part of the Redis keys,
this can lead to functions with large arguments using up a lot of
RAM in Redis just due to keys.

You can write a key-fn that returns a hash of the actual function arguments (or a particular long argument).

This is a convenience function to achieve that.

Note that nippy already does lz4 compression on keys over 8kb.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close