Forum Discussion

vijayk1's avatar
vijayk1
Occasional Contributor
6 years ago

how to disable caching at readyAPI end?

Hi All,

 

I'm getting error while running test via ReadyAPI, it seems readyAPI is checking its local cache and not hitting server.

In response header I'm getting different value for Age Header (which means response is old one)

 

Here is My test:

1) create some item

2) get item

3) delete item

4) delay of 8 sec

5) get item (this is getting positive response) 

 

please find response header for my GET request below:

 

( response header for step no 2)

HTTP/1.1 200
Date: Wed, 15 May 2019 10:53:47 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: Keep-Alive
Age: 0

 

(Response header for step no 5)

 

HTTP/1.1 200
Date: Wed, 15 May 2019 10:53:47 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: Keep-Alive
Age: 8

 

 

When checking via POSTMAN its working fine.

 

 

Response from POSTMAN:

 

Date Wed, 15 May 2019 10:53:56 GMT
Content-Length 0
Connection Keep-Alive
Age 0
 
Please let me know how to disable local cache in ReadyAPI. ( Checked with readyAPI version 2.5, 2.6 and 2.7)
 
Thanks,
VijayK1
  • Hi vijayk1

     

    I can't really tell from the detail you've provided in regards to the ReadyAPI! vs Postman calls what the problem is but from your description it sounds like you believe ReadyAPI! is submitting requests and instead of retrieving the latest record from your webservice you believe ReadyAPI! is retrieving the response from some sort of local cache?

     

    SoapUI/ReadyAPI! caches the request parameters and .wsdls, but as far as I was aware it doesn't even include a facility to retrieve from a cache as this would only cause the user problems as far as I can tell.

     

    I could be wrong - I am more often than I'm not - but having a response cache in ReadyAPI! would only cause problems as far as I can tell.

     

    Have you double checked your results and spoken to a developer?  I think it's far more likely your webservice has a caching facility like Redis or equivalent.

     

    I'd speak to a developer to double check,

     

    Sorry I can't be of more help,

     

    Cheers,

     

    richie

  • richie's avatar
    richie
    Community Hero

    Hi vijayk1

     

    I can't really tell from the detail you've provided in regards to the ReadyAPI! vs Postman calls what the problem is but from your description it sounds like you believe ReadyAPI! is submitting requests and instead of retrieving the latest record from your webservice you believe ReadyAPI! is retrieving the response from some sort of local cache?

     

    SoapUI/ReadyAPI! caches the request parameters and .wsdls, but as far as I was aware it doesn't even include a facility to retrieve from a cache as this would only cause the user problems as far as I can tell.

     

    I could be wrong - I am more often than I'm not - but having a response cache in ReadyAPI! would only cause problems as far as I can tell.

     

    Have you double checked your results and spoken to a developer?  I think it's far more likely your webservice has a caching facility like Redis or equivalent.

     

    I'd speak to a developer to double check,

     

    Sorry I can't be of more help,

     

    Cheers,

     

    richie

      • vijayk1's avatar
        vijayk1
        Occasional Contributor

        We are under discussion with dev team regarding server side/proxy caching.

        But as of now after more debugging, we found that postman is adding temporary header ("Cache-Control":"no-cache").

        After adding "Cache-Control":"no-cache" for GET in readyAPI its working fine.

         

        We'll update once we get final confirmation from Dev.

         

        Thanks,

        vijayk1