留言板

How to disable cache in Liferay 5.2.3

anitha thota,修改在9 年前。

How to disable cache in Liferay 5.2.3

New Member 发布: 1 加入日期: 14-7-18 最近的帖子
Hi,

We have developed a application using Liferay 5.2.3. After login to the application and browse some authenticated pages and logged out.

Then go to History of the browser and click on the pages , now we are able to view all authenticated pages which are accessed at time of login.

For this we need different options to disable cache, but its not working,

We have tried below options:

1) Included the below code in ROOT/WEB-INF/web.xml

<filter-name>Header Filter</filter-name>
<filter-class>com.liferay.filters.header.HeaderFilter</filter-class>
<init-param>
<param-name>Cache-Control</param-name>
<param-value>max-age=0,must-revalidate,private,no-store,no-cache</param-value>
</init-param>
<init-param>
<param-name>Expires</param-name>
<param-value>-1</param-value>
</init-param>
<init-param>
<param-name>Pragma</param-name>
<param-value>no-cache</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>Header Filter</filter-name>
<url-pattern>/group/*</url-pattern>
</filter-mapping>
<filter-mapping>


2)change it in portal-ext.properties

com.liferay.portal.servlet.filters.cache.CacheFilter=false

Please some one helps me regarding this.

Regards,
Anitha