Skip to content

SolarQuery Caching Proxy

Matt Magoffin edited this page Apr 12, 2020 · 2 revisions

The SolarQuery API can be accessed via a caching proxy, to better support scaling high-use applications. The SolarQuery API paths and semantics do not change, just the host name you make the API requests to changes.

Please note that when using token authentication, continue to use the normal SolarQuery host when generating authentication signatures. That is, you continue to sign your requests as if they went to SolarQuery directly, while making the actual HTTP request to the proxy.

The default SolarQuery caching proxy is available at https://query.solarnetwork.net. This caches content for at most 10 minutes.

A shorter-lived cache service is also available at https://query.solarnetwork.net/1m. This caches content for at most 1 minute.

You can try out the caching proxy service on the API Explorer. Just fill in the proxy URL in the Proxy field.

Notes

  • Requests are only cached if called more than 1 time. Thus the first 2 requests to a URL will essentially hit SolarNetwork. The 3rd can come from the cache.
  • A X-Proxy-Cache HTTP header shows if the data comes from cache or not.
  • Only /solarquery requests are supported
Clone this wiki locally