Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-11871

API is returning cached results even after the resources have been changed (BB-14519)

    XMLWordPrintable

Details

    Description

      I have an application that is creating and deleting hooks for repositories of users.

      In the code we query the hooks of a repo and then decide what to do next.
      This is an example of request we are doing:

      https://bitbucket.org/api/2.0/repositories/lobengula3rd/carsstore/hooks/?access_token=*users access token**

      After we add a hook the GET request of getting all the hooks still returns and old response without the newly added hook.

      When i looked in the headers of the response i can see that there is a header:
      'x-cache-status': HIT

      Why is this response being signaled as cached when the resources have been changed?
      This is really a bad beheaviour.

      Is there a way to signify that i don't want cached results? I am very amazed this is acting like this. Why are responses of GET are being cached?

      The only solution for me was to add another query string param with a dynamic value like the current date to get other this issue.
      This is probably also occuring for all rest of apis.

      Attachments

        Activity

          People

            Unassigned Unassigned
            legacy-bitbucket-user Legacy Bitbucket Cloud User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: