Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1619

Blob/Clob Action results are cached no matter what

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.14.0
    • Fix Version/s: 1.15.0
    • Component/s: Core: Viewer: Wicket
    • Labels:
      None

      Description

      If you click an Action that returns a Blob (download), the client receives a HTTP response header with an entry Pragma: "cache".

      If the Blob is dynamically changing with every request, the client will not see this changes. (As long as the request url stays the same.)

      Expected behavior would be (at least for this code snippet) to produce a new result with each invocation.

      SimpleObjectMenu.java
      @Action(semantics=SemanticsOf.NON_IDEMPOTENT)
      public Blob download() {
      	return new Blob("blob", "application/json",
                    ("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
      }
      

      But it does not!

      Steps to reproduce:
      Take the simple-app artifact 1.14 and add above snippet to the SimpleObjectMenu.
      Consecutive calls of the download action will not be updated. Instead the client/browser provides cached data from an earlier request.

        Activity

        Hide
        hobrom Andi Huber added a comment - - edited
        Show
        hobrom Andi Huber added a comment - - edited Fixed with PR #81 https://github.com/apache/isis/pull/81
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 99843f2b092d8a3e5578a81e9191e81502f164aa in isis's branch refs/heads/master from Andi Huber
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=99843f2 ]

        ISIS-1619, prevent clients from caching the response content of
        Blob/Clob Action results.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 99843f2b092d8a3e5578a81e9191e81502f164aa in isis's branch refs/heads/master from Andi Huber [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=99843f2 ] ISIS-1619 , prevent clients from caching the response content of Blob/Clob Action results.

          People

          • Assignee:
            danhaywood Dan Haywood
            Reporter:
            hobrom Andi Huber
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development