joyent / conch-api

Datacenter build and management service
Mozilla Public License 2.0
22 stars 11 forks source link

Include caching headers for suitable unauthed endpoints #896

Closed karenetheridge closed 5 years ago

karenetheridge commented 5 years ago

GET /schema/* are the prime candidates for this. Include Last-Modified in the response.

nginx then needs to be configured to use the headers to cache the results so the api isn't hit all the time.

Also handle If-Modified-Since, If-Unmodified-Since in the request headers to return 304 rather than computing the response.