Hello,
I was testing an API call to evaluate its cost, and I encountered what appears to be an issue with server-side caching. Here’s what happened:
1. When I made the API call for the first time, the usage updated instantly.
2. On a subsequent call, the usage did not update immediately and took much longer to reflect the change.
3. I suspect that caching on the server side might be causing this delay.
4. To troubleshoot, I added the Cache-Control: "no-cache" header in my request, and I then received an API response showing updated usage—different from what’s displayed on the dashboard.
5. Because I frequently test single API calls to estimate the usage for larger jobs, having to wait several hours for the cache to expire is not ideal.
Could you please disable caching for this endpoint in the dashboard to ensure the stats are updated in real time?
Thanks, and feel free to ask any additional questions.
What I used to do a non-cached call from my browser console:
fetch("https://services.sentinel-hub.com/api/v1/accounting/statistics/requests/monthlyStatistics?customerAccountId=YOUR_CUSTOMER_ID_HERE&resolution=DAILY&year=2025&month=3", {
method: "GET",
headers: {
"Cache-Control": "no-cache",
"Authorization": "Bearer YOUR_BEARER_TOKEN_HERE"
},
cache: "no-store"
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error fetching data:", error));