set json

This block is part of the redis group and was last modified in core v13.0.8.

Redis Key Selection Required

This block relies on a Redis key to perform its redis releated actions. You must manually select the Redis key you want to use in the flow in the blueprint using the Redis key selector modal. To access the modal, click the white button on the block.

Type Selection Required

This block requires you to select the data type you want to work with. You must manually select the type using the type selector modal. To access the modal, click the white button on the block.

Field Selection Required

This block requires field selection (in). You must manually select the fields you want to work with using the field selector modal. To access the modal, click the white button on the block.

set json v13.0.8

Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type.

In pins 1 + flow
  • flow
    flow
  • TTL
    number

    Set the specified expire time, in seconds.

    Default none

Out pins 2 + flow
  • flow
    flow
  • success
    condition
  • key
    value

    current redis key, this outpin be handy when using dynamic redis keys

JSON-encodes the value from the block's dynamically-typed input pin and stores the resulting string under the cache key, overwriting any existing value; a falsy input stores the JSON empty string "". ttl is in seconds; absent or invalid means no expiry. Fails with INVALID_TYPE when no field type is selected on the block and with MISSING_REDIS_KEY when no key resolves; in simulation nothing is stored but success=true with error NOT_EXECUTED_IN_SIMULATION_MODE.

redis set
set cache

A typical wiring for set json: a function trigger starts the flow; the flow out pin feeds debug.

Studio canvas example for the set json block: typical wiring for set json.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v13.0.8.

Service documentation

External API reference This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.
Back to redis Return to the main group to view all sub-groups Back to redis Return to the group to view all blocks within this group