Enable caching
Helicone-Cache-Enabled
header to your requests:Make your request
Verify caching works
"true"
to enable caching"max-age=604800"
(7 days)Example: "max-age=3600"
for 1 hour cache"1"
(single response cached)Example: "3"
to cache up to 3 different responses"user-123"
to maintain user-specific cache"request_id,timestamp"
to ignore these fields when generating cache keys"Helicone-Cache-Bucket-Max-Size": "10"
.prompt_cache_key
parameter:prompt_cache_key
so Helicone cache works across different OpenAI cache entriesDashboard view of cache hits, cost and time saved
Cache-Control
header:
max-age=3600
max-age=86400
max-age=604800
(default)max-age=2592000
max-age=31536000
)prompt_cache_key
when using OpenAI prompt caching alongside Helicone cachingNeed more help?