Caching
Some endpoints may implement caching to improve performance and reduce response times. Understanding how our caching works can help you build more efficient integrations and better predict API behaviour.
How API caching works
We typically cache successful GET request responses (HTTP 200 status codes).
Cache duration by endpoint type
Different endpoints have different cache durations based on how frequently the underlying data changes:
- Static reference data or historical metrics (e.g., site configuration, device lists, monthly consumption) - Longer cache periods
- Real-time data (e.g., live utility or environmental readings) - Shorter or no cache periods
info
Specific cache durations are configured per endpoint and may vary. Cache headers in API responses will indicate the exact cache behaviour for each request.
Cache headers in responses
API responses include standard HTTP cache headers to help you understand caching behaviour:
Cache-Control: Indicates caching directives (e.g.,public, max-age=300)Expires: Absolute expiration time for cached contentLast-Modified: When the resource was last updated
Cache invalidation
Cached responses are automatically invalidated when:
- The cache duration expires
- Underlying data is updated through API operations
- System maintenance requires cache clearing
Benefits for your integration
Understanding caching helps you:
- Predict response times - Cached responses are faster
- Plan request patterns - Frequent requests for the same data won't impact performance
- Implement client-side caching - Use cache headers to optimise your own caching strategy
- Reduce rate limit impact - Cached responses don't count towards rate limits
Best practices
- Respect cache headers in API responses when implementing client-side caching
- Don't bypass caching unnecessarily - it benefits both performance and rate limits
- Plan for cache misses - First requests or after cache expiry will take longer
When caching doesn't apply
Caching is not used for:
- Non-GET requests (
POST,PUT,DELETE, etc.) - Requests that return error status codes (4xx, 5xx)