掲示板

Apache cache and search problem

11年前 に Alejandro López によって更新されました。

Apache cache and search problem

Junior Member 投稿: 53 参加年月日: 11/07/08 最新の投稿
Hi.

I have Liferay installed on 2 nodes, deployed on a Weblogic and behind a Apache Web Server.

There was all ok, but 2 days ago, I've enabled apache cache, and when I make some search, sometimes the searcher returns blank page (there's no any message "No results were found that matched the keywords" ).

I'm using Federated Search Portlet (ID 3) embedded on theme.

If I disable apache cache, all works ok. When start up apache cache, at first seems that searcher works ok (¿until the page is cached?)

I don't know what's happening.

Any suggestion?
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Apache cache and search problem

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
You're probably caching dynamic content too. Set your apache to only cache static content.

Also, check if permission is working alright when cache is enabled.
11年前 に Alejandro López によって更新されました。

RE: Apache cache and search problem

Junior Member 投稿: 53 参加年月日: 11/07/08 最新の投稿
Hi Hitoshi.

I think you're right and it's apache configuration. When solved, I will write solution.
Thanks
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Apache cache and search problem

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Which tool are you using to connect Apache and Tomcat? Which modules are you enabling?
11年前 に Alejandro López によって更新されました。

RE: Apache cache and search problem

Junior Member 投稿: 53 参加年月日: 11/07/08 最新の投稿
Sorry but I only know that we are using Mod Disk Cache.
11年前 に Alejandro López によって更新されました。

RE: Apache cache and search problem

Junior Member 投稿: 53 参加年月日: 11/07/08 最新の投稿
I think, that when I make a request to a page, for example:
http://SERVER/es/web/descripcion

This page is cached and returned correctly.

But if I make a search situated at this page, the URL it's similar:
http://SERVER/es/web/descripcion?p_p_auth=SJ2SRzAT&p_p_id=3&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_col_count=3&_3_struts_action=%2Fsearch%2Fsearch

Then, because the page "descripcion" is cached. Search don't works.

When cache is empty, searcher works ok.

I nedd to configure Apache Server to avoid a response from cache if the request has some of this parameters.
p_p_auth=SJ2SRzAT&p_p_id=3&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_col_count=3&_3_struts_action=%2Fsearch%2Fsearch

Anyone can help.

We're using MOD_DISK_CACHE

Thanks in advance.
11年前 に Alejandro López によって更新されました。

RE: Apache cache and search problem

Junior Member 投稿: 53 参加年月日: 11/07/08 最新の投稿
Hi.

I've think another solution is create one page for search results ("/es/web/search") and configure portlet to redirect always to this page.

If I use a portlet on a page, I can make it by "Look and Feel" tab of the portlet (option "Link to URL"), but I have the portlet embedded on theme.

How can I configure this on a portlet embedded on theme? Some option on "liferay-portlet.xml" or "portlet-custom.xml"?

Thanks


pd: I'm using Liferay 6.0
thumbnail
11年前 に Mika Koivisto によって更新されました。

RE: Apache cache and search problem

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
Don't cache the pages on Apache.
11年前 に Alejandro López によって更新されました。

RE: Apache cache and search problem

Junior Member 投稿: 53 参加年月日: 11/07/08 最新の投稿
But caching pages on Apache improves performance a lot . I think it's necessary.

How can I set "Link to page" attribute in the embeded search portlet?

Thanks
thumbnail
11年前 に Juan Gonzalez P によって更新されました。

RE: Apache cache and search problem

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Hola Alejandro.

Caching pages can be a huge mistake if it isn't configured properly. IMHO it doesn't have any sense in CMS, pages are dynamic content. Resources can be cached because most of them are static, but that's all.

For example, whenever you change a web content you should clear the cache in Apache. And that's an awful maintenance (CMS should be easy to mantain).

Liferay caches a lot of things on its own (for example images, documents, css, etc), so I guess you don't have to worry about this.
11年前 に Alejandro López によって更新されました。

RE: Apache cache and search problem

Junior Member 投稿: 53 参加年月日: 11/07/08 最新の投稿
Hola Juan, y gracias.

In my case, the content will be modified rarely. For that reason, we think Apache is necessary and improves performance of the responses.

I don't know which is cache set up. That's the reason I'm trying to redirect searches to a new page (not cached).

Maybe is better disable apache cache. I'll think about it.

Gracias!!