Memorizer: Redis
AI-generatedOverview
This node, named "Memorizer: Redis," is designed to store and retrieve data using a Redis database as a caching layer. It supports two modes of operation: "General" and "Asset." The node helps in scenarios where you want to cache data temporarily or persistently to improve performance, reduce redundant API calls, or maintain state between workflow executions.
Typical use cases include:
- Caching API responses to avoid repeated requests.
- Storing intermediate computation results for reuse.
- Managing asset-related data separately from general cached data.
- Debugging workflows by enabling detailed input/output information.
Properties
| Name | Meaning |
|---|---|
| Memorize Mode | Selects the memorization mode: - General: General caching mode. - Asset: Asset-specific caching mode. |
| Key Prefix | A string prefix used for all keys stored in Redis to namespace or group cached entries. |
| TTL | Time to live (in seconds) for cached entries. Values ≤ 0 mean the data is stored forever. |
| Debug Mode | Enables verbose logging and exposes more detailed information in the node's input and output for troubleshooting. |
Output
The node outputs a single field named response containing the result of the memorization operation. This response is generated via a proxy that abstracts the underlying memorizer implementation (either general or asset mode). The exact structure depends on the memorizer but generally includes cached data or confirmation of storage.
No binary data output is indicated by the source code.
Dependencies
- Requires a Redis server accessible with proper credentials.
- Needs an API key or authentication token configured in n8n credentials for Redis access.
- Uses internal memorizer classes for general and asset caching logic.
- No additional external services are required beyond Redis.
Troubleshooting
- Connection issues: If the node cannot connect to Redis, verify network connectivity and credential correctness.
- Data not persisting: Check the TTL value; if set to 0 or negative, data should persist indefinitely. Otherwise, it expires after TTL seconds.
- Unexpected output: Enable Debug Mode to get detailed logs and inspect input/output data for anomalies.
- Mode selection errors: Ensure the "Memorize Mode" property is correctly set to either "General" or "Asset" to match your caching needs.