Our app sends OpenAI requests with a long, shared instruction block followed by tenant-specific settings and the user's message. I'm trying to estimate whether prompt caching will make a meaningful difference to our bill, rather than just improve a few carefully arranged test requests.
The awkward part is traffic: some tenants send requests every minute, while others might send two in an afternoon. Their settings also change occasionally.
What would make the measurement realistic?
- Should I compare cached input tokens per request, or calculate a cost-weighted figure across a full day?
- How should I account for changes to the shared instructions and tenant-specific settings?
- Which request details should I record to distinguish cache behavior from ordinary variations in response length?
I'd appreciate advice on measuring prompt caching savings using API usage data. I don't want to assume that identical text is always eligible for a cache hit, or that one busy tenant's results represent everyone else.
Can you answer this question?
Write Answer0 Answers