observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

API responses use `max-age=30s` (only) cache header, including for pinned versions #573

Open declann opened 1 year ago

declann commented 1 year ago

Hi,

In a Quarto CLI discussion I noted that OHQ notebook imports resulting in calls to api.observablehq.com cause application performance issues because of the max-age=30s cache header response from the API endpoint.

This might reasonably be set for notebooks that are in development, but for pinned-version imports the cache could probably be put to more effective use? (i.e. remove max-age or make it far bigger)

This would be better for OJS-runtime application performance, and for OHQ API performance and costs (I suppose).

Regards, Declan

declann commented 1 year ago

The application I have in mind will run Quarto/OJS-runtime code on frequent hot reload events - the API behaviour is clearly significant (and highly redundant) for this usecase.