在Liferay portlet中没有缓存JSF资源

时间:2015-07-31 03:28:22

标签: jsf-2 primefaces liferay

我在Liferay中写了一个primefaces portlet。当使用Chrome的开发人员工具加载视图资源时,我看到jsf资源(js,css)没有缓存。

http://localhost:8080/web/qldt/bao-cao-tinh-hinh-thuc-hien-fdi?p_p_id=BaoCaoDuAnFDI_WAR_qldtportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_BaoCaoDuAnFDI_WAR_qldtportlet_javax.faces.resource=primefaces.js&_BaoCaoDuAnFDI_WAR_qldtportlet_ln=primefaces&v=5.2的示例响应标头:

Cache-Control:private, no-cache, no-store, must-revalidate
Content-Encoding:gzip
Content-Length:71495
Content-Type:application/javascript;charset=UTF-8
Date:Fri, 31 Jul 2015 02:55:19 GMT
ETag:W/"340248-1432143286996"
Expires:Thu, 29 Oct 2015 02:55:19 GMT
Last-Modified:Wed, 20 May 2015 17:34:46 GMT
Liferay-Portal:Liferay Portal Community Edition 6.1.2 CE (Paton / Build 6102 / August 2, 2013)
portlet.http-status-code:200
Pragma:no-cache

但Liferay的资源非常完美。

我使用:jsf 2.1,primefaces 5.2,liferay 6.1.2,liferayfaces 3.1.2-ga3。

有没有办法缓存jsf资源?

感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

我在您的portal-ext.properties文件中有 browser.cache.signed.in.disabled = true ,因此我的jsf资源在我登录时没有缓存。

相关问题