Redis
DoubleDino Proxy supports Redis key lookup.
Redis uses a different query model from databases such as PostgreSQL or MongoDB.
Instead of querying records, you request values using Redis keys.
Endpoint
Use:
/redis
Basic key lookup
Example:
Retrieve a value:
- curl
- Node.js / Bun
- Python
curl -G "http://localhost:8080/redis" \
--data-urlencode "key=cache:user:123" \
-H "x-api-key: your-api-key"
const response = await fetch(
"http://localhost:8080/redis?key=" +
encodeURIComponent("cache:user:123"),
{
headers: {
"x-api-key": "your-api-key"
}
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
"http://localhost:8080/redis",
params={
"key": "cache:user:123"
},
headers={
"x-api-key": "your-api-key"
}
)
print(response.json())
Key patterns
Redis key patterns are supported.
Example:
curl -G "http://localhost:8080/redis" \
--data-urlencode "key=cache:user:*" \
-H "x-api-key: your-api-key"
This allows retrieving multiple matching keys.
JSON values
If a Redis value contains JSON, DoubleDino transforms nested values while preserving the original structure.
Example:
Original value:
{
"user_id": 123,
"preferences": {
"theme": "dark"
}
}
Returned value:
{
"user_id": 123,
"preferences": {
"theme": "dark"
}
}
The JSON structure remains usable by applications.
Debugging production issues
A common workflow:
A developer receives a real Redis key:
session:user:abc123
They query:
curl -G "http://localhost:8080/redis" \
--data-urlencode "key=session:user:abc123" \
-H "x-api-key: your-api-key"
The returned value is transformed while preserving the structure needed for debugging.
Preserving known expressions
If enabled by your administrator, additional expressions can be preserved per request.
Header:
x-preserve-expressions
Example:
-H "x-preserve-expressions: tracking metadata"
This requires:
DD_ALLOW_DYNAMIC_EXPRESSIONS=true
Notes
- DoubleDino does not modify Redis data.
- Keys are used to retrieve values.
- Returned values are transformed.
- JSON structures are preserved.
- The original Redis instance remains unchanged.
Next steps
Continue with:
- Logs