RE: Best use of Caching in liferay

thumbnail
Mohammed Azam, modified 12 Years ago. Regular Member Posts: 159 Join Date: 11/6/09 Recent Posts
Hi Team,

I have external system (webservice) which returns huge static data that I need to render in a page. what will be best solution in liferay that we need not have to make calls evetime and cache it one place and entire application can access it.

I can transform the response to JSON/ XML /Objects .

Currently I am planning to store on portletsession APPLICATION SCOPE . Need to know any other solution.



Thanks
thumbnail
Murali Krishna, modified 12 Years ago. Junior Member Posts: 47 Join Date: 1/17/12 Recent Posts
HI Azam,

Look into MultiVmPool in liferay. http://www.apoorvaprakash.in/2012/03/liferay-cache-key-to-improve.html

Murali
thumbnail
Mohammed Azam, modified 12 Years ago. Regular Member Posts: 159 Join Date: 11/6/09 Recent Posts
Thanks Murali but looks like in 6.2 this feature could not be used. As MultiVmPool has no "put method"
thumbnail
Mohammed Azam, modified 12 Years ago. Regular Member Posts: 159 Join Date: 11/6/09 Recent Posts
Hi I found the solution . Just refer WikiCacheUtil.java in liferay portal source .

The way liferay has implemented by creating object "_portalCache". and values being set to it. Will write a detailed steps and share it across emoticon

Thanks. emoticon
thumbnail
Mohammed Azam, modified 12 Years ago. Regular Member Posts: 159 Join Date: 11/6/09 Recent Posts
Hi The only problem that I am facing is the value is returning "null" after some time when the system is idle

How do we increase it to make the the value persists for longer time.

Thanks