RE: Configuring Local Disk Storage with Ehcache in Liferay 7.4 for Single-Node

Olaf Kock, modified 1 Year ago. New Member Posts: 2 Join Date: 12/19/23 Recent Posts

I'm working on a Liferay 7.4 project and would like to integrate Ehcache for caching purposes. Specifically, I want to configure Ehcache to store data on the local disk of a single node. What steps do I need to follow to achieve this integration? Can you provide a sample configuration or guide for using Ehcache in a Liferay 7.4 environment with local disk storage?

'm currently in the process of configuring Ehcache in Liferay 7.4 to leverage its internal caching mechanism for performance optimization. However, during the integration process, I've encountered the following issue: "Unresolved requirement: Import-Package: net.sf.ehcache; version='2.10.0'." 

 

thumbnail
Olaf Kock, modified 1 Year ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

Out of the box, Liferay uses ehcache already.

What's the performance that you'd like to tune - especially by utilizing slow external (disk) storage? Or do you try to cache custom data, rather than stock Liferay data?

That being said, AFAIK this documentation, despite being for 7.2, should still be quite accurate. I'm just not confident that it'll solve your underlying problem based on what you state above.

As of your "Unresolved requirement" issue: This hints at custom code leveraging ehcache: Please provide a minimal sample project and show what you did and how you built your custom code.

Jamie Sammons, modified 1 Year ago. New Member Posts: 2 Join Date: 12/19/23 Recent Posts

I'm trying to configure terracotta with Liferay 7.4 CE. I want to put some custom cache in ehcache. Please provide me with a guided path.

 

thumbnail
Olaf Kock, modified 1 Year ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

What's the performance problem that you'd like to tune? Which load test have you already executed, what was the result and what makes you suspect that Terracotta can solve it?

E.g. I'm not confident that introducing Terracotta will solve it.

The last time I've seen Terracotta explicitly mentioned was during the 6.x times, a long time ago. That's not to say that it doesn't work, but I don't expect that "a guided path" exists.