shuyangzhou/liferay-portal — pull request #276 by laszlocsontos (2013-04-10 07:39:45+00:00)
Title: LPS-34161

Hey Shuyang,

I removed those commits of mine where I attempted to add caching, becuase you found another way.

This pull request contains a highly simplified version of these former commits.

https://github.com/laszlocsontos/liferay-portal/commit/5705a53ceeab758a3dd7c1179f8aa7e39111c6ef
https://github.com/laszlocsontos/liferay-portal/commit/167ed758c7852b4e30ba4883b5e39850a4c73450

I've moved @ThreadLocalCachable upper in the caller chain. As you can see in docroot/html/portlet/search/init.jsp, private method _getViewFullContentURL(...) is called for every search hit; and LayoutServiceUtil.getDefaultPlid(...) is pretty heavy to be called many times.

Cheers,
Laszlo.