Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46025

REST APIs responses are not set with appropriate cache controls

    XMLWordPrintable

    Details

    • Epic Link:
    • Sprint:
      Blue Ocean 1.2
    • Similar Issues:

      Description

      The REST responses from Blue Ocean don't have any cache control in the header ie:

      cache-control:"no-cache, no-store, no-transform

      Which causes IE to cache the responses.

      ie. This means that IE users will not see newly added pipelines

      To reproduce this:

      • In IE visit the pipelines view. Close it.
      • In a different browser, create a new job that should be visible in the pipelines view
      • Open the pipelines view again in IE. The new pipeline won't be visible until the cache is deleted or you open developers tools and disable the it.
         

        Attachments

          Issue Links

            Activity

            Hide
            alobato Alvaro Lobato added a comment -

            James Dumay Michael Neale Vivek Pandey my proposal to fix this would be to add 

             

            response.setHeader("cache-control", "no-cache, no-store, no-transform");

            here:

            https://github.com/jenkinsci/blueocean-plugin/blob/cb8a9140b5f6777c176c45025ca6f97630d70441/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/ApiHead.java#L89 

            Before returning and only if that header hans't been set, allowing that way the Containers, etc to override it.

            WDYT?

             

            cc: James Nord

            Show
            alobato Alvaro Lobato added a comment - James Dumay Michael Neale Vivek Pandey my proposal to fix this would be to add    response.setHeader( "cache-control" , "no-cache, no-store, no-transform" ); here: https://github.com/jenkinsci/blueocean-plugin/blob/cb8a9140b5f6777c176c45025ca6f97630d70441/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/ApiHead.java#L89   Before returning and only if that header hans't been set, allowing that way the Containers, etc to override it. WDYT?   cc: James Nord

              People

              • Assignee:
                alobato Alvaro Lobato
                Reporter:
                alobato Alvaro Lobato
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: