transportapi / api-console

A Web Component for an interactive REST console based on RAML files
Other
0 stars 0 forks source link

browser cached after deploying RAML changes #15

Open harry-wood opened 7 years ago

harry-wood commented 7 years ago

Changes to the RAML files will not result in updated api-console docs, or at least not immediately and predictably, due to browser caching.

I'm noticing this after deploying this small change: https://github.com/transportapi/main/pull/1116 The change has made it into the RAML as expected, but both safari and chrome are caching the old RAML so not seeing the fix. With chrome a shift+refresh fixes it. Safari is still caching the wrong version for me

(In this case we want to see the /at/ bit in this public journey URL /uk/public/journey/from/{from}/to/{to}/{type}/at/{date}/{time}.json Maybe you can see the caching problem yourselves )

I notice that one way to fix this would be to put a cache-busting string on the end of the RAML URL. e.g. this looks good in safari https://developer.transportapi.com/docs?raml=https://transportapi.com/v3/raml/transportapi.raml?1234 I could see if we can do that in liquid tags in 3scale CMS, but I'm not sure if we would still have problems with changes to the included files.