Fórum

Disable Cache in Liferay 7 GA 4

S K K, modificado 6 Anos atrás.

Disable Cache in Liferay 7 GA 4

New Member Postagens: 21 Data de Entrada: 16/01/17 Postagens Recentes
Hi every one,
I am using liferay 7 GA3 on my local development and application is running fine on local . In production we are using Liferay 7 GA4 and application acting weird like when I am submitting data some times working and some times its not completing request. when I tried to inspect and in network if I disable cache application working fine. So I tried to disable cache from application but "meta tags are not working cause Http headers are overriding meta tags". I tried by changing setenv.sh file by adding
JAVA_OPTS="-Xms256m -Xmx1024m -XX: PermSize=32m -XX:MaxPermSize=160m -Dfile.encoding=UTF8 -Duser.timezone=GMT+2
-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
-Dexternal-properties=portal-developer.properties" . But no use.
and I tried to add below code in JSP
<%
response.setHeader("Cache-Control","no-cache");//HTTP 1.1 
response.setHeader("Pragma","no-cache");//HTTP 1.0 
response.setDateHeader("Expires",0);//prevents caching at the proxy server  
%>
But its not even loading in the portlet.

I am using "action request" to submit the form.

I am running out of option so any one ran into same issue or have any idea how I can fix this issue please help me. I really appreciate you time and Help . Thanks.
thumbnail
Jorge Díaz, modificado 6 Anos atrás.

RE: Disable Cache in Liferay 7 GA 4

Liferay Master Postagens: 753 Data de Entrada: 09/01/14 Postagens Recentes
Try configuring headers in HeaderFilter. More information see: https://stackoverflow.com/questions/46204302/cache-expired-time-for-all-pages-in-liferay/46218138#46218138