api-designer icon indicating copy to clipboard operation
api-designer copied to clipboard

Api designer caches the reuqest

Open maryoush opened this issue 10 years ago • 3 comments

Hi, We found out that the api-designer caches a get request for remote includes.

#%RAML 0.8
title: my Products API
baseUri: http://localhost/
version: v1
mediaType:  application/json

schemas:

  - error: !include http://api.mycompany.com/patterns/v1/schema-error-message.json 

traits: 

  - !include http://api.mycompanys.com/patterns/v1/trait-languageModification-aware.yaml    


/products:
  type: collection

Once I have temporary unavailable resource at http://api.mycompanys.com/patterns/v1/trait-languageModification-aware.yaml I got the message similar to this

screen shot 2014-09-11 at 13 00 33

The api-designer does not recover even if the remote resource is available again.

Only solution is to artificially add some query param to remote resource

  - !include http://api.mycompanys.com/patterns/v1/trait-languageModification-aware.yaml?162627536723

to make the UI really fetch it again.

maryoush avatar Sep 11 '14 13:09 maryoush

Hi @maryoush, quick question, is this on IE? If the answer is yes, you pretty much nailed the only solution that can be implemented client side: http://www.dashbay.com/2011/05/internet-explorer-caches-ajax/

dmartinezg avatar Sep 11 '14 13:09 dmartinezg

We could consider adding functionality to our API clients such as console and notebook that detect IE and add a cache buster for you automatically on GET requests, based on some setting you can turn off if you like. That's especially important in console where you have no programmatic control over API requests On Sep 11, 2014 6:47 AM, "Damian Martinez Gelabert" < [email protected]> wrote:

Hi @maryoush https://github.com/maryoush, quick question, is this on IE? If the answer is yes, you pretty much nailed the only solution that can be implemented client side: http://www.dashbay.com/2011/05/internet-explorer-caches-ajax/

— Reply to this email directly or view it on GitHub https://github.com/mulesoft/api-designer/issues/224#issuecomment-55265755 .

usarid avatar Sep 11 '14 14:09 usarid

This occurs on chrome and FF - currently can not get you the right version but I believe there are one of the recent ones.

Wysłane z iPada

Dnia 11 wrz 2014 o godz. 15:47 Damian Martinez Gelabert [email protected] napisał(a):

Hi @maryoush, quick question, is this on IE? If the answer is yes, you pretty much nailed the only solution that can be implemented client side: http://www.dashbay.com/2011/05/internet-explorer-caches-ajax/

— Reply to this email directly or view it on GitHub.

maryoush avatar Sep 11 '14 17:09 maryoush