{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Cache & counters — Redis",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Visitor session",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "visitor": "v-1881",
          "plan": "trial"
        }
      },
      "position": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "put",
      "type": "storage.redis",
      "label": "Cache session (1h)",
      "category": "io",
      "config": {
        "credentialId": "",
        "host": "localhost",
        "port": 6379,
        "password": "",
        "db": 0,
        "tls": false,
        "rejectUnauthorized": false,
        "operation": "set",
        "key": "session:v-1881",
        "value": "",
        "ttlSeconds": 3600,
        "field": "",
        "commandJson": [],
        "timeoutMs": 10000
      },
      "position": {
        "x": 530,
        "y": 0
      }
    },
    {
      "id": "get",
      "type": "storage.redis",
      "label": "Read it back",
      "category": "io",
      "config": {
        "credentialId": "",
        "host": "localhost",
        "port": 6379,
        "password": "",
        "db": 0,
        "tls": false,
        "rejectUnauthorized": false,
        "operation": "get",
        "key": "session:v-1881",
        "value": "",
        "ttlSeconds": 0,
        "field": "",
        "commandJson": [],
        "timeoutMs": 10000
      },
      "position": {
        "x": 1060,
        "y": 0
      }
    },
    {
      "id": "out",
      "type": "utility.console",
      "label": "Session store",
      "category": "utility",
      "config": {
        "message": "cached session: {{ $json }}"
      },
      "position": {
        "x": 1590,
        "y": 0
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "put",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "put",
      "sourcePort": "output",
      "targetNodeId": "get",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "get",
      "sourcePort": "output",
      "targetNodeId": "out",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "Session cache in Redis: SET the visitor record with a TTL, GET it back. Pre-wired for localhost:6379 — the docker one-liner in this description is all it needs."
  }
}