Bug 824852

Summary: UIGadgetPortlet doesn't set up correctly browser caching for gadget resources
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: hfnukal <hfnukal>
Component: PortalAssignee: Nobody <nobody>
Status: MODIFIED --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.2.2.ER01CC: epp-bugs, theute, tkyjovsk
Target Milestone: ---   
Target Release: 5.2.x   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hfnukal@redhat.com 2012-05-24 12:58:12 UTC
UIGadgetPortlet doesn't set up correctly browser caching for gadget resources

Comment 1 Michal Vanco 2012-07-13 09:31:47 UTC
Any information what has been fixed or what can be verified is missing here and in GTNPORTAL jira as well.

Comment 2 JBoss JIRA Server 2012-07-30 12:32:34 UTC
Michal Vanco <mvanco> made a comment on jira GTNPORTAL-2389

Kien, can you please provide more information about this issue and fix?

Comment 3 JBoss JIRA Server 2012-07-31 02:30:54 UTC
Trong Tran <trongtt> made a comment on jira GTNPORTAL-2389

the issue here is that the gadget is specified to be rendered in *nocache* and *debug* mode.

You could reproduce the issue by adding a Gadget in Edit Page/Portal layout and check the browser caching for its resources

Comment 4 JBoss JIRA Server 2012-07-31 02:34:17 UTC
Trong Tran <trongtt> made a comment on jira GTNPORTAL-2389

The fix is to use *nocache* and *debug* mode for gadget when portal is running in *developing* mode

Comment 5 Miroslav Cupák 2012-08-02 11:08:27 UTC
I verified the issue and I can observe that certain resources (eXoResources/javascript/eXo/gadget/Gadgets.js and eXoResources/javascript/eXo/gadget/ExoBasedUserPrefStore.js) used to be cached when older versions of EPP were started with exo.product.developing set and are not being cached in EPP 5.2.2. Can anybody please confirm that this is what the fix is about?

Comment 6 JBoss JIRA Server 2012-08-02 11:51:26 UTC
kien nguyen <nguyenanhkien2a> made a comment on jira GTNPORTAL-2389

I confirm this behaviour:
when Gatein start in developing mode, it means gadget resources are not cached.
When Gatein start in non-developing mode, all gadget resources now will be cached.

This fix is used for gadget portlet in a page, so you should test with gadget portlet to see what changed (not for gadgets in dashboard) and you  must test in non-developing mode.

You can see two sample images that demonstrate usecases "before" and "after" this fix.
A bit technical is parameter nocache=0 will be set for gadget resources URL to have its cache

Comment 7 Miroslav Cupák 2012-08-02 13:36:53 UTC
Understood, thanks. Unfortunately, this seems to be fixed only in GateIn and not picked up by EPP 5.2.2.ER03. I placed a gadget portlet on a portal page and got the following result:

Expected result (GateIn master):
Resource URL: http://localhost:8080/eXoGadgetServer/gadgets/ifr?container=default&mid=0&nocache=0&country=ALL&lang=en&view=canvas&parent=http%3A%2F%2F10.16.93.36%3A8080%2Fportal%2Fclassic%2Ftest%3A%2F%2F10.16.93.36%3A8080&st=default%3Akix7K5yL_oHe-zFsjROHH-eN97AcT_126XYD4eQWMMnT3Ey8np63na_WgrRCGV54ED2pBy3gJuDqUJbeg8U5ht2F6VJFmdgcJKrZ2HOJ_zLdHTTPTNY7wjKrPEFBMTAzhYOMZAkknHH8bj36mEtnMdOcbV09Pqfnam2so9Almo44lOq9WCsMK6ybaqySIG0D-io4nxScbFFLwr-zCwodpyF3U0BYiaGI3gV1V11jVi12vkNfFP8E7SyZTN0_3DmAFW0uCfaSiMDGzPFkZ1_m-nJUion-dGLHbE01BZHFDX2D71G3l0IsNqIjeS5KHpXe70T-B6eOICLr5Uv8nd2pdx6e72M&url=http%3A%2F%2F10.16.93.36%3A8080%2Frest%2Fjcr%2Frepository%2Fportal-system%2Fproduction%2Fapp%3Agadgets%2Fapp%3ACalendar%2Fapp%3Adata%2Fapp%3Aresources%2FCalendar.xml#rpctoken=292066526 (note nocache=0)
Cache-Control: private,max-age=300

Actual result (EPP 5.2.2.ER03):
Resource URL: http://localhost:8080/eXoGadgetServer/gadgets/ifr?container=default&mid=0&nocache=undefined&country=ALL&lang=en&view=canvas&parent=http%3A%2F%2Flocalhost%3A8080&st=default%3AJEuzOo0q9z7ai_PK96sKWhqYSrJUzqNDPrl54J9UuxOCiDw9drlSGvsmMXXKkQ6KKYaWqaLrKPhBAmOQVHDSNpc2vDczZP8a2wHMO4Q_kvfNX9mKjA8c-r1r6rdGwPS4nx9tmWPg6bil60wN6FYAqRRsLHcHfYyV1n9ta15qhGtbNlC0gHmbg112bGaQtSD4tN5ZAQji9oIm6rV50QlGdGXaklXfgiKPaFtnUVhu13pmTVmjeI6aqW_9Pk41wuvsRE85JJstIhqRAQHig2nZqMc9zupx2XKPWADLQzZMa44aONod8-WjRFoexf70TLwMWfDuXy8KplTsM08rLi1qcawk7Qo&url=http%3A%2F%2Flocalhost%3A8080%2Frest%2Fjcr%2Frepository%2Fportal-system%2Fproduction%2Fapp%3Agadgets%2Fapp%3ACalendar%2Fapp%3Adata%2Fapp%3Aresources%2FCalendar.xml#rpctoken=1051415886 (note nocache=undefined)
Cache-Control: no-cache

Comment 8 Thomas Heute 2012-08-09 09:15:26 UTC
AFAIK it is not a regression ? If it's not please target 5.2.x

Comment 9 Miroslav Cupák 2012-08-09 10:27:31 UTC
Not a regression.