cache_put
Store JSON-serializable data in the cache with a specified TTL (Time to Live) to efficiently manage API responses, computed values, or other frequently accessed data.
Instructions
Store a value in the cache with TTL. Useful for caching API responses, computed values, etc.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
key | Yes | Cache key | |
namespace | No | Optional namespace to prevent key collisions | default |
ttl_seconds | No | Time to live in seconds | |
value | Yes | Value to cache (any JSON-serializable data) |
Input Schema (JSON Schema)
{
"properties": {
"key": {
"description": "Cache key",
"type": "string"
},
"namespace": {
"default": "default",
"description": "Optional namespace to prevent key collisions",
"type": "string"
},
"ttl_seconds": {
"default": 300,
"description": "Time to live in seconds",
"maximum": 86400,
"minimum": 1,
"type": "number"
},
"value": {
"description": "Value to cache (any JSON-serializable data)"
}
},
"required": [
"key",
"value"
],
"type": "object"
}