Discussion:
[jira] [Created] (ISIS-1619) Blob/Clob Action results are cached no matter what
Andi Huber (JIRA)
2017-05-17 00:36:04 UTC
Permalink
Andi Huber created ISIS-1619:
--------------------------------

Summary: Blob/Clob Action results are cached no matter what
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Fix For: 1.15.0


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 Pragma: "no-cache"

@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json", "{}".getBytes());
}





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Andi Huber (JIRA)
2017-05-17 09:37:04 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andi Huber updated ISIS-1619:
-----------------------------
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.

@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.

was:
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 Pragma: "no-cache"

@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json", "{}".getBytes());
}
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Fix For: 1.15.0
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.
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json", ("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Andi Huber (JIRA)
2017-05-17 09:40:04 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andi Huber updated ISIS-1619:
-----------------------------
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.

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

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.

was:
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.

@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.
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Fix For: 1.15.0
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.
{code:title=SimpleObjectMenu.java|borderStyle=solid}
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json",
("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
{code}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Andi Huber (JIRA)
2017-05-17 12:28:04 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16013933#comment-16013933 ]

Andi Huber commented on ISIS-1619:
----------------------------------

I've created a pull request to demonstrate a possible solution:

https://github.com/apache/isis/pull/79
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Fix For: 1.15.0
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.
{code:title=SimpleObjectMenu.java|borderStyle=solid}
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json",
("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
{code}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Andi Huber (JIRA)
2017-05-26 07:38:04 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16013933#comment-16013933 ]

Andi Huber edited comment on ISIS-1619 at 5/26/17 7:37 AM:
-----------------------------------------------------------

Fixed with PR #81
https://github.com/apache/isis/pull/81


was (Author: hobrom):
I've created a pull request to demonstrate a possible solution:

https://github.com/apache/isis/pull/79
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Fix For: 1.15.0
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.
{code:title=SimpleObjectMenu.java|borderStyle=solid}
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json",
("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
{code}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
ASF subversion and git services (JIRA)
2017-05-27 05:20:04 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16027203#comment-16027203 ]

ASF subversion and git services commented on ISIS-1619:
-------------------------------------------------------

Commit 99843f2b092d8a3e5578a81e9191e81502f164aa in isis's branch refs/heads/master from [~hobrom]
[ 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.
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Fix For: 1.15.0
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.
{code:title=SimpleObjectMenu.java|borderStyle=solid}
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json",
("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
{code}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Dan Haywood (JIRA)
2017-05-27 07:36:04 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Haywood reassigned ISIS-1619:
---------------------------------

Assignee: Dan Haywood
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Assignee: Dan Haywood
Fix For: 1.15.0
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.
{code:title=SimpleObjectMenu.java|borderStyle=solid}
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json",
("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
{code}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Dan Haywood (JIRA)
2017-05-27 07:37:04 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Haywood resolved ISIS-1619.
-------------------------------
Resolution: Fixed
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Assignee: Dan Haywood
Fix For: 1.15.0
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.
{code:title=SimpleObjectMenu.java|borderStyle=solid}
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json",
("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
{code}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
ASF subversion and git services (JIRA)
2018-10-05 06:04:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639314#comment-16639314 ]

ASF subversion and git services commented on ISIS-1619:
-------------------------------------------------------

Commit 36f3688b8dad9dff256e9a330220d33835fb7875 in isis's branch refs/heads/v2 from [~hobrom]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=36f3688 ]

ISIS-1619: properly handle action semantics in blob/clob request caching

Task-Url: https://issues.apache.org/jira/browse/ISIS-1619
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Assignee: Dan Haywood
Priority: Major
Fix For: 1.15.0
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.
{code:title=SimpleObjectMenu.java|borderStyle=solid}
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json",
("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
{code}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
ASF subversion and git services (JIRA)
2018-10-05 06:04:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639313#comment-16639313 ]

ASF subversion and git services commented on ISIS-1619:
-------------------------------------------------------

Commit 36f3688b8dad9dff256e9a330220d33835fb7875 in isis's branch refs/heads/v2 from [~hobrom]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=36f3688 ]

ISIS-1619: properly handle action semantics in blob/clob request caching

Task-Url: https://issues.apache.org/jira/browse/ISIS-1619
Post by Andi Huber (JIRA)
Blob/Clob Action results are cached no matter what
--------------------------------------------------
Key: ISIS-1619
URL: https://issues.apache.org/jira/browse/ISIS-1619
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 1.14.0
Reporter: Andi Huber
Assignee: Dan Haywood
Priority: Major
Fix For: 1.15.0
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.
{code:title=SimpleObjectMenu.java|borderStyle=solid}
@Action(semantics=SemanticsOf.NON_IDEMPOTENT)
public Blob download() {
return new Blob("blob", "application/json",
("{\"now\" : \""+new java.util.Date()+"\"}").getBytes());
}
{code}
But it does not!
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Loading...